package rainbowPackage;

import javafx.scene.paint.Paint.*;
import javafx.scene.paint.Color;

public class ColorSlider //Basic Class For Variating Colors For RainbowSoftColor.java Class
{
	public double[] RGB = {0,0,0};
	public Color FXColor;
	public double ColorBeingChecked = 0;//, ColorToBeChecked = 0;
	//ColorValueFit colorValueFit = new ColorValueFit(0.);
	public ColorSlider()//1st Square DiagnosticsClass.java
	{
        this.RGB = new double[]{0,0,0,0};
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
	}
	public ColorSlider( Color FXColor )//2nd Square DiagnosticsClass.java
	{
		this.FXColor = FXColor;
        this.RGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 };
    }
	public ColorSlider( double[] RGB )//3rd Square DiagnosticsClass.java
	{
        this.RGB = RGB;
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
    }
	public Object ColorSliderFunction(double ColorInterval, double Loc, ColorSlider ColorBefore, ColorSlider ColorAfter)//4th Square DiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
			this.RGB[z] = ColorValueFitter( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Loc/ColorInterval + ColorBefore.RGB[z] ) );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return new ColorSlider( RGB );
	}
	public Object ColorSliderFunction(double ColorInterval, double Loc, double BrightnessMultiplyer, ColorSlider ColorBefore, ColorSlider ColorAfter)//5th Square DiagnosticsClass.java
	{
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				this.RGB[z] = ColorValueFitter( ( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Loc/ColorInterval + ColorBefore.RGB[z] ) * BrightnessMultiplyer) );
		else
			for (int z = 0; z <= 2; z++)
			{
				this.RGB[z] = Math.abs( ( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Loc/ColorInterval + ColorBefore.RGB[z] ) ) );
				this.RGB[z] = ColorValueFitter( (255 - RGB[z]) / BrightnessMultiplyer + RGB[z] );
			}
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return new ColorSlider( RGB );
	}
	public Object ColorSliderFunction(double ColorInterval, double Loc, ColorSlider ColorBefore, ColorSlider ColorAfter, int Gradations)//6th Square DiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
			this.RGB[z] = ColorValueFitter( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.RGB[z] ) );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return new ColorSlider( RGB );
	}
	public Object ColorSliderFunction(double ColorInterval, double Loc, double BrightnessMultiplyer, ColorSlider ColorBefore, ColorSlider ColorAfter, int Gradations)//7th Square DiagnosticsClass.java
	{
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				this.RGB[z] = ColorValueFitter( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.RGB[z] * BrightnessMultiplyer ) );
		else
			for (int z = 0; z <= 2; z++)
			{
				this.RGB[z] = Math.abs( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.RGB[z] ) );
				this.RGB[z] = ( (255 - RGB[z]) / BrightnessMultiplyer + RGB[z] );
			}
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return new ColorSlider( RGB );
	}
	public Color ToFXColor ()//8th Square DiagnosticsClass.java
	{
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
        return FXColor;
	}
	public Color ToFXColor ( double[] RGB )//9th Square DiagnosticsClass.java
	{
		this.RGB = RGB;
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
        return FXColor;
	}
	//tempFXColor = tempFXColor.rgb((int)color.RGB[0] , Math.abs( (int)color.RGB[1] ), (int)color.RGB[2]).invert();
	public Boolean ColorTooSimilarFunction(int Color1, int Color2)//10th Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int color1A = (Color1 >> 24) & 0xff;
	    int color1R = (Color1 >> 16) & 0xff;
	    int color1G = (Color1 >> 8) & 0xff;
	    int color1B = (Color1) & 0xff;
	    int color2A = (Color2 >> 24) & 0xff;
	    int color2R = (Color2 >> 16) & 0xff;
	    int color2G = (Color2 >> 8) & 0xff;
	    int color2B = (Color2) & 0xff;
		/*
		int Color1A = Color1 / 16777216;
		int Color1R = ( Color1 - Color1A * 16777216 ) / 65536;
		int Color1G = ( Color1 - Color1A * 16777216 - Color1R * 65536 ) / 256;
		int Color1B = ( Color1 - Color1A * 16777216 - Color1R * 65536 - Color1G * 256);
		int Color2A = Color2 / 16777216;
		int Color2R = ( Color2 - Color2A * 16777216 ) / 65536;
		int Color2G = ( Color2 - Color2A * 16777216 - Color2R * 65536 ) / 256;
		int Color2B = ( Color2 - Color2A * 16777216 - Color2R * 65536 - Color2G * 256);// */
		int colorDifference = Math.abs(color1R - color2R) + Math.abs(color1G - color2G) + Math.abs(color1B - color2B);
		if ( colorDifference <= 164 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public Boolean ColorTooSimilarFunction(ColorSlider Color1, ColorSlider Color2)//11th Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int colorDifference = (int)( Math.abs(Color1.RGB[0] - Color2.RGB[0]) + Math.abs(Color1.RGB[1] - Color2.RGB[1]) + Math.abs(Color1.RGB[2] - Color2.RGB[2]) );
		if ( colorDifference <= 164 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public double ColorValueFitter ( double ColorToBeChecked )//12th Square DiagnosticsClass.java
	{
		this.ColorBeingChecked = Math.abs(ColorToBeChecked);
		while ( ColorBeingChecked > 255)
			this.ColorBeingChecked = ColorBeingChecked - 255;
		return ColorBeingChecked;
	}
	public void set(double[] RGB) { this.RGB = RGB; this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) ); }//13th Square DiagnosticsClass.java
	public void set(Color FXColor) { this.FXColor = FXColor; this.RGB = new double[] { ColorValueFitter(FXColor.getRed() * 255), ColorValueFitter(FXColor.getGreen() * 255), ColorValueFitter(FXColor.getBlue() * 255) }; }//14th Square DiagnosticsClass.java
    public Object get() { return RGB; }//15th Square DiagnosticsClass.java
    //public Object get() { return FXColor; }
}//*/


/*public class Color(double R, double G, double B)  Color
{
	RGB[0] = R;
	RGB[1] = G;
	RGB[2] = B;
	//return RGB;
}*/







package rainbowPackage;

import javafx.scene.paint.Paint.*;
import javafx.scene.paint.Color;

public class ColorTooSimilar //Basic Class For Determining If 2 Colors Are Too Similar To Be Discerned By The Eye, To Be Accessed By RainbowSoft2D.java
{
	public boolean TooSimilar;// = {0,0,0};
	
	public ColorTooSimilar()//1st Square DiagnosticsClass.java
	{
		this.TooSimilar = false;
	}
	
	public ColorTooSimilar(boolean TooSimilar)//2nd Square DiagnosticsClass.java
	{
		this.TooSimilar = TooSimilar;
	}
	
	public Boolean ColorTooSimilarFunction( int Color1, int Color2 )//3rd Square DiagnosticsClass.java
	{
	    int color1A = (Color1 >> 24) & 0xff;
	    int color1R = (Color1 >> 16) & 0xff;
	    int color1G = (Color1 >> 8) & 0xff;
	    int color1B = (Color1) & 0xff;
	    int color2A = (Color2 >> 24) & 0xff;
	    int color2R = (Color2 >> 16) & 0xff;
	    int color2G = (Color2 >> 8) & 0xff;
	    int color2B = (Color2) & 0xff;
		/*Color1 = Math.abs(Color1);
		int Color1A = Color1 / 16777216;
		int Color1R = ( Color1 - Color1A * 16777216 ) / 65536;
		int Color1G = ( Color1 - Color1A * 16777216 - Color1R * 65536 ) / 256;
		int Color1B = ( Color1 - Color1A * 16777216 - Color1R * 65536 - Color1G * 256);
		Color2 = Math.abs(Color2);
		int Color2A = Color2 / 16777216;
		int Color2R = ( Color2 - Color2A * 16777216 ) / 65536;
		int Color2G = ( Color2 - Color2A * 16777216 - Color2R * 65536 ) / 256;
		int Color2B = ( Color2 - Color2A * 16777216 - Color2R * 65536 - Color2G * 256);
		System.out.println("Color1: " +  Color1);
		System.out.println("Color1A: " +  Color1A);
		System.out.println("Color1R: " +  Color1R);
		System.out.println("Color1G: " +  Color1G);
		System.out.println("Color1B: " +  Color1B);
		System.out.println("Color2: " +  Color2);
		System.out.println("Color2A: " +  Color2A);
		System.out.println("Color2R: " +  Color2R);
		System.out.println("Color2G: " +  Color2G);
		System.out.println("Color2B: " +  Color2B);//*/
		int colorDifference = Math.abs(Math.abs(color1R) - Math.abs(color2R)) + Math.abs(Math.abs(color1G) - Math.abs(color2G)) + Math.abs(Math.abs(color1B) - Math.abs(color2B));
		if ( colorDifference <= 164 )//200 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public Boolean ColorTooSimilarFunction( Color Color1, Color Color2 )//4th Square DiagnosticsClass.java
	{
		int colorDifference = (int)(Math.abs(Math.abs(Color1.getRed()) - Math.abs(Color2.getRed())) + Math.abs(Math.abs(Color1.getGreen()) - Math.abs(Color2.getGreen())) + Math.abs(Math.abs(Color1.getBlue()) - Math.abs(Color2.getBlue())));
		if ( colorDifference <= 164 )//200 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}

	public void set(boolean TooSimilar) { this.TooSimilar = TooSimilar; }//5th Square DiagnosticsClass.java
	public Object get() { return TooSimilar; }//6th Square DiagnosticsClass.java
}






package rainbowPackage;

import javafx.scene.paint.Paint.*;
import javafx.scene.paint.Color;
import javafx.geometry.Rectangle2D;

public class Diagnostics
{
	public Rectangle2D Bounds = new Rectangle2D( 0, 0, 1920, 1080 );
	public ColorTooSimilar colorTooSimilar = new ColorTooSimilar(false);
	public double[] RGB = {0,0,0};// = {0,0,0};
	public double[] ARGB = {0,0,0,1};// = {0,0,0};
	public Color FXColor;
	ColorSlider black = new ColorSlider( new double[]{0,0,0} );
	ColorSlider white = new ColorSlider( new double[]{255,255,255} );
	ColorSlider skyblue = new ColorSlider( new double[]{134,206,249} );
	ColorSlider oxylblue = new ColorSlider( new double[]{0,255,255} );
	ColorSlider pink = new ColorSlider( new double[]{255,64,143} );
	ColorSlider blue = new ColorSlider( new double[]{0,0,192} );
	ColorSlider red = new ColorSlider( new double[]{193,0,0} );
	ColorSlider purple = new ColorSlider( new double[]{122,0,178} );
	ColorSlider orange = new ColorSlider( new double[]{255,134,0} );
	ColorSlider green = new ColorSlider( new double[]{0,133,50} );
	ColorSlider yellow = new ColorSlider( new double[]{246,252,15} );
	ColorSlider teal = new ColorSlider( new double[]{3,224,149} );
	ColorSlider bronze = new ColorSlider( new double[]{152,123,46} );
	ColorSlider silver = new ColorSlider( new double[]{193,192,192} );
	ColorSlider gold = new ColorSlider( new double[]{205,191,44} );
	ColorSlider lime = new ColorSlider( new double[]{126,193,33} );
	ColorSlider brown = new ColorSlider( new double[]{131,103,71} );
	ColorSlider neongreen = new ColorSlider( new double[]{0,255,0} );
	ColorSlider oxylblue0FF = new ColorSlider( new double[]{0,255,255} );
	int oxylblue0FFNum = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(255 * 256) + 255;
	TransparencySlider blackT = new TransparencySlider( new double[]{0,0,0} );
	TransparencySlider whiteT = new TransparencySlider( new double[]{255,255,255} );
	TransparencySlider skyblueT = new TransparencySlider( new double[]{134,206,249} );
	TransparencySlider oxylblueT = new TransparencySlider( new double[]{0,255,255} );
	TransparencySlider pinkT = new TransparencySlider( new double[]{255,64,143} );
	TransparencySlider blueT = new TransparencySlider( new double[]{0,0,192} );
	TransparencySlider redT = new TransparencySlider( new double[]{193,0,0} );
	TransparencySlider purpleT = new TransparencySlider( new double[]{122,0,178} );
	TransparencySlider orangeT = new TransparencySlider( new double[]{255,134,0} );
	TransparencySlider greenT = new TransparencySlider( new double[]{0,133,50} );
	TransparencySlider yellowT = new TransparencySlider( new double[]{246,252,15} );
	TransparencySlider tealT = new TransparencySlider( new double[]{3,224,149} );
	TransparencySlider bronzeT = new TransparencySlider( new double[]{152,123,46} );
	TransparencySlider silverT = new TransparencySlider( new double[]{193,192,192} );
	TransparencySlider goldT = new TransparencySlider( new double[]{205,191,44} );
	TransparencySlider limeT = new TransparencySlider( new double[]{126,193,33} );
	TransparencySlider brownT = new TransparencySlider( new double[]{131,103,71} );
	TransparencySlider neongreenT = new TransparencySlider( new double[]{0,255,0} );
	TransparencySlider oxylblue0FFT = new TransparencySlider( new double[]{0,255,255} );

	Color[] imperialFXcolors = new Color[] {green.ToFXColor(), blue.ToFXColor(), purple.ToFXColor(), blue.ToFXColor(), green.ToFXColor()};
	double[][] imperialColorsNum = {green.RGB, blue.RGB, purple.RGB, purple.RGB, blue.RGB, green.RGB};
	Color[] imperialFXcolorsReverse = new Color[] {red.ToFXColor(), orange.ToFXColor(), gold.ToFXColor(), orange.ToFXColor(), red.ToFXColor()};
	double[][] imperialColorsReverseNum = {red.RGB, orange.RGB, gold.RGB, gold.RGB, orange.RGB, red.RGB};
	Color[] doubleBlack = new Color[] { black.ToFXColor(), black.ToFXColor() };

	ColorSlider color = black;
	TransparencySlider colorTransparency = new TransparencySlider( new double[]{0,0,0,1} );
	RainbowSoftColor rainbowSoftColor = new RainbowSoftColor ( new double[]{0,0,0,1} );
	int xRectangleNum = 0, yRectangleNum = 0;
	public double ColorBeingChecked = 0, OpacityBeingChecked = 1, xSlid = 0;

	public Diagnostics ( Rectangle2D Bounds )
	{
		this.Bounds = Bounds;
	}
	public Color ToFXColor ()//8th Square BasicDiagnosticsClass.java
	{
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return FXColor;
	}

	public Object ColorTooSimilar( double x, double y, double xSlider )
	{
		int xRectangleQuantity = 3, yRectangleQuantity = 2;
		for ( xRectangleNum = 0; xRectangleNum < xRectangleQuantity; xRectangleNum++ )
			if ( x >= Bounds.getMinX() + Bounds.getWidth() * xRectangleNum / xRectangleQuantity && x <= Bounds.getMinX() + Bounds.getWidth() * ( xRectangleNum + 1 ) / xRectangleQuantity )
				break;
		for ( yRectangleNum = 0; yRectangleNum < yRectangleQuantity; yRectangleNum++ )
			if ( y >= Bounds.getMinY() + Bounds.getHeight() * yRectangleNum / yRectangleQuantity && y <= Bounds.getMinY() + Bounds.getHeight() * ( yRectangleNum + 1 ) / yRectangleQuantity )
				break;
		xSlid = ( x - Bounds.getMinX() ) - ( xRectangleNum * Bounds.getWidth() + ( xSlider - Bounds.getMinX() ) ) / xRectangleQuantity;
		while ( xSlid < 0 )
			xSlid = xSlid + Bounds.getWidth() / xRectangleQuantity;
		while ( xSlid > Bounds.getWidth() / xRectangleQuantity )
			xSlid = xSlid - Bounds.getWidth() / xRectangleQuantity;
		color.ColorSliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, purple, oxylblue0FF );
		switch ( yRectangleNum )
		{
		case 0:
			switch ( xRectangleNum )
			{
			case 0:
				colorTooSimilar = new ColorTooSimilar ();
				if ( colorTooSimilar.TooSimilar )
					color = neongreen;
				break;
			case 1:
				colorTooSimilar = new ColorTooSimilar ( true );
				if ( colorTooSimilar.TooSimilar )
					color = neongreen;
				break;
			case 2:
				int tempColorNum = (int)((int)( 255 * 16777216) + (int)(color.ToFXColor().getRed() * 255 * 65536) + (int)(color.ToFXColor().getGreen() * 255 * 256) + color.ToFXColor().getBlue() * 255);
				if ( colorTooSimilar.ColorTooSimilarFunction( tempColorNum, oxylblue0FFNum ) )
					color = neongreen;
				break;
			}
			break;
		case 1:
			switch ( xRectangleNum )
			{
			case 0:
				color.ColorSliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, purple, oxylblue0FF );
				if ( colorTooSimilar.ColorTooSimilarFunction( color.ToFXColor(), oxylblue0FF.ToFXColor() ) )
					color = neongreen;
				break;
			case 1:
				colorTooSimilar.set(true);
				if ( colorTooSimilar.TooSimilar )
					color = neongreen;
				break;
			case 2:
				if ( (boolean) colorTooSimilar.get() )
					color = neongreen;
				break;
			}
			break;
		}
		return color;
	}

	public Object ColorSlider( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations )
	{
		int xRectangleQuantity = 3, yRectangleQuantity = 5;
		for ( xRectangleNum = 0; xRectangleNum < xRectangleQuantity; xRectangleNum++ )
			if ( x >= Bounds.getMinX() + Bounds.getWidth() * xRectangleNum / xRectangleQuantity && x <= Bounds.getMinX() + Bounds.getWidth() * ( xRectangleNum + 1 ) / xRectangleQuantity )
				break;
		for ( yRectangleNum = 0; yRectangleNum < yRectangleQuantity; yRectangleNum++ )
			if ( y >= Bounds.getMinY() + Bounds.getHeight() * yRectangleNum / yRectangleQuantity && y <= Bounds.getMinY() + Bounds.getHeight() * ( yRectangleNum + 1 ) / yRectangleQuantity )
				break;
		xSlid = ( x - Bounds.getMinX() ) - ( xRectangleNum * Bounds.getWidth() + ( xSlider - Bounds.getMinX() ) ) / xRectangleQuantity;
		while ( xSlid < 0 )
			xSlid = xSlid + Bounds.getWidth() / xRectangleQuantity;
		while ( xSlid > Bounds.getWidth() / xRectangleQuantity )
			xSlid = xSlid - Bounds.getWidth() / xRectangleQuantity;
		switch ( yRectangleNum )
		{
		case 0:
			switch ( xRectangleNum )
			{
			case 0:
				color = new ColorSlider();
				break;
			case 1:
				color = new ColorSlider( white.FXColor );
				break;
			case 2:
				color = new ColorSlider( green.RGB );
				break;
			}
			break;
		case 1:
			switch ( xRectangleNum )
			{
			case 0:
				color.ColorSliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, green, purple );
				break;
			case 1:
				color.ColorSliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, blue, green );
				break;
			case 2:
				color.ColorSliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, purple, green, Gradations );
				break;
			}
			break;
		case 2:
			switch ( xRectangleNum )
			{
			case 0:
				color.ColorSliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, purple, green, Gradations );
				break;
			case 1:
				color = new ColorSlider ( color.ToFXColor() );
				break;
			case 2:
				color = new ColorSlider ( color.ToFXColor( pink.RGB ) );
				break;
			}
			break;
		case 3:
			switch ( xRectangleNum )
			{
			case 0:
				color.ColorSliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, blue, oxylblue0FF );
				int tempColorNum = (int)((int)( 255 * 16777216) + (int)(color.ToFXColor().getRed() * 255 * 65536) + (int)(color.ToFXColor().getGreen() * 255 * 256) + color.ToFXColor().getBlue() * 255);
				if ( color.ColorTooSimilarFunction( tempColorNum, oxylblue0FFNum ) )
					color = neongreen;
				break;
			case 1:
				color.ColorSliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, purple, oxylblue0FF );
				if ( color.ColorTooSimilarFunction( color, oxylblue0FF ) )
					color = neongreen;
				break;
			case 2:
				if ( 0 <= color.ColorValueFitter(5000) && color.ColorValueFitter(5000) <= 255  && 0 <= color.ColorValueFitter(-5000) && color.ColorValueFitter(-5000) <= 255 )
					color = white;
				else
					color = black;
				break;
			}
			break;
		case 4:
			switch ( xRectangleNum )
			{
			case 0:
				color.set( FXColor.AQUAMARINE );
				break;
			case 1:
				color.set( new double[]{255,134,0} );
				break;
			case 2:
				color = new ColorSlider ( (double[]) gold.get() );
				break;
			}
			break;
		}
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(color.RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return color;
	}

	public Object TransparencySlider( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter )
	{
		int xRectangleQuantity = 4, yRectangleQuantity = 6;
		for ( xRectangleNum = 0; xRectangleNum < xRectangleQuantity; xRectangleNum++ )
			if ( x >= Bounds.getMinX() + Bounds.getWidth() * xRectangleNum / xRectangleQuantity && x <= Bounds.getMinX() + Bounds.getWidth() * ( xRectangleNum + 1 ) / xRectangleQuantity )
				break;
		for ( yRectangleNum = 0; yRectangleNum < yRectangleQuantity; yRectangleNum++ )
			if ( y >= Bounds.getMinY() + Bounds.getHeight() * yRectangleNum / yRectangleQuantity && y <= Bounds.getMinY() + Bounds.getHeight() * ( yRectangleNum + 1 ) / yRectangleQuantity )
				break;
		xSlid = ( x - Bounds.getMinX() ) - ( xRectangleNum * Bounds.getWidth() + ( xSlider - Bounds.getMinX() ) ) / xRectangleQuantity;
		while ( xSlid < 0 )
			xSlid = xSlid + Bounds.getWidth() / xRectangleQuantity;
		while ( xSlid > Bounds.getWidth() / xRectangleQuantity )
			xSlid = xSlid - Bounds.getWidth() / xRectangleQuantity;
		switch ( yRectangleNum )
		{
		case 0:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency = new TransparencySlider();
				break;
			case 1:
				colorTransparency = new TransparencySlider( white.FXColor );
				break;
			case 2:
				colorTransparency = new TransparencySlider( green.RGB );
				break;
			case 3:
				colorTransparency = new TransparencySlider( greenT.ARGB );
				break;
			}
			break;
		case 1:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, greenT, purpleT );
				break;
			case 1:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, blueT, greenT, OpacityBefore );
				break;
			case 2:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, blueT, redT, OpacityBefore, OpacityAfter );
				break;
			case 3:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, redT, BrightnessMultiplyer, purpleT );
				break;
			}
			break;
		case 2:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, blueT, BrightnessMultiplyer, brownT, OpacityBefore );
				break;
			case 1:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, yellowT, BrightnessMultiplyer, redT, OpacityBefore, OpacityAfter );
				break;
			case 2:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, Gradations, bronzeT, silverT );
				break;
			case 3:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, Gradations, silverT, goldT, OpacityBefore );
				break;
			}
			break;
		case 3:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, Gradations, bronzeT, goldT, OpacityBefore, OpacityAfter );
				break;
			case 1:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, yellowT, blueT );
				break;
			case 2:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, orangeT, blueT, OpacityBefore );
				break;
			case 3:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, greenT, goldT, OpacityBefore, OpacityAfter );
				break;
			}
			break;
		case 4:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency = new TransparencySlider ( colorTransparency.ToFXColor() );
				break;
			case 1:
				colorTransparency = new TransparencySlider ( colorTransparency.ToFXColor( pinkT.ARGB ) );
				break;
			case 2:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, blueT, oxylblue0FFT );
				int tempColorNum = (int)((int)( 255 * 16777216) + (int)(colorTransparency.ToFXColor().getRed() * 255 * 65536) + (int)(colorTransparency.ToFXColor().getGreen() * 255 * 256) + colorTransparency.ToFXColor().getBlue() * 255);
				if ( colorTransparency.ColorTooSimilarFunction( tempColorNum, oxylblue0FFNum ) )
					colorTransparency = neongreenT;
				break;
			case 3:
				colorTransparency.TransparencySliderFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, purpleT, oxylblue0FFT );
				if ( colorTransparency.ColorTooSimilarFunction( colorTransparency, oxylblue0FFT ) )
					colorTransparency = neongreenT;
				break;
			}
			break;
		case 5:
			switch ( xRectangleNum )
			{
			case 0:
				if ( 0 <= colorTransparency.ColorValueFitter(5000) && colorTransparency.ColorValueFitter(5000) <= 255  && 0 <= colorTransparency.ColorValueFitter(-5000) && colorTransparency.ColorValueFitter(-5000) <= 255 )
					colorTransparency = whiteT;
				else
					colorTransparency = blackT;
				break;
			case 1:
				color.set( FXColor.AQUAMARINE );
				break;
			case 2:
				colorTransparency.set( new double[]{255,134,0,1} );
				break;
			case 3:
				colorTransparency = new TransparencySlider ( (double[]) goldT.get() );
				break;
			}
			break;
		}
		this.ARGB = colorTransparency.ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(colorTransparency.ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = colorTransparency.ToFXColor();
		return colorTransparency;
	}

	public Object RainbowSoftColor( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, double[][] ARGBcolorArray, double OpacityBefore, double OpacityAfter )
	//For Variated Gradations = 2147483647, For Rainbow 2 Fully Black Colors Into FXcolorArray, For Fully Opaque OpacityBefore = 1 & OpacityAfter = 1
	{
		int xRectangleQuantity = 2, yRectangleQuantity = 17;
		for ( xRectangleNum = 0; xRectangleNum < xRectangleQuantity; xRectangleNum++ )
			if ( x >= Bounds.getMinX() + Bounds.getWidth() * xRectangleNum / xRectangleQuantity && x <= Bounds.getMinX() + Bounds.getWidth() * ( xRectangleNum + 1 ) / xRectangleQuantity )
				break;
		for ( yRectangleNum = 0; yRectangleNum < yRectangleQuantity; yRectangleNum++ )
			if ( y >= Bounds.getMinY() + Bounds.getHeight() * yRectangleNum / yRectangleQuantity && y <= Bounds.getMinY() + Bounds.getHeight() * ( yRectangleNum + 1 ) / yRectangleQuantity )
				break;
		xSlid = ( x - Bounds.getMinX() ) - ( xRectangleNum * Bounds.getWidth() + ( xSlider - Bounds.getMinX() ) ) / xRectangleQuantity;
		while ( xSlid < 0 )
			xSlid = xSlid + Bounds.getWidth() / xRectangleQuantity;
		while ( xSlid > Bounds.getWidth() / xRectangleQuantity )
			xSlid = xSlid - Bounds.getWidth() / xRectangleQuantity;
		switch ( xRectangleNum )
		{
		case 0://1st Column
			switch ( yRectangleNum )
			{
			case 0:
				rainbowSoftColor = new RainbowSoftColor();
				break;
			case 1:
				rainbowSoftColor = new RainbowSoftColor( white.FXColor );
				break;
			case 2:
				ARGB = new double[] { green.RGB[0], green.RGB[1], green.RGB[1], 1 };
				rainbowSoftColor = new RainbowSoftColor( ARGB );
				break;
			case 3:
				rainbowSoftColor.RainbowSoftColorRainbowFunction( Bounds.getWidth() / xRectangleQuantity, xSlid );
				break;
			case 4:
				rainbowSoftColor.RainbowSoftColorFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, new RainbowSoftColor ( green.ToFXColor() ), new RainbowSoftColor ( purple.ToFXColor() ) );
				break;
			case 5:
				rainbowSoftColor.RainbowSoftColorFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, new RainbowSoftColor ( blue.ToFXColor() ), new RainbowSoftColor ( green.ToFXColor() ) );
				break;
			case 6:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionReverse( Bounds.getWidth() / xRectangleQuantity, xSlid );
				break;
			case 7:
				rainbowSoftColor.RainbowSoftCustomColorFunction ( Bounds.getWidth() / xRectangleQuantity, xSlid, ARGBcolorArray );
				break;
			case 8:
				rainbowSoftColor.RainbowSoftCustomColorFunction ( Bounds.getWidth() / xRectangleQuantity, xSlid, FXcolorArray );
				break;
			case 9:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionUnAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 10:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionReverseUnAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 11:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 12:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionReverseAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 13:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionUnAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 14:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionReverseUnAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 15:
				rainbowSoftColor.RainbowSoftCustomColorFunctionUnAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, ARGBcolorArray );
				break;
			case 16://17th Square
				rainbowSoftColor.RainbowSoftCustomColorFunctionUnAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray );
				break;
			}
		case 1://2nd Column
			switch ( yRectangleNum )
			{
			case 0://18th Square
				rainbowSoftColor.RainbowSoftCustomColorFunctionAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, ARGBcolorArray );
				break;
			case 1:
				rainbowSoftColor.RainbowSoftCustomColorFunctionAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray );
				break;
			case 2:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionUnAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, ARGBcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 3:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionUnAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 4:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 5:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionReverseAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 6:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, ARGBcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 7:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionAdjusted ( Bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 8://26th Square DiagnosticsClass.java
				rainbowSoftColor = new RainbowSoftColor ( bronzeT.ARGB );
				rainbowSoftColor = new RainbowSoftColor ( rainbowSoftColor.ToFXColor() );
				break;
			case 9:
				rainbowSoftColor = new RainbowSoftColor ( rainbowSoftColor.ToFXColor( silverT.ARGB ) );
				break;
			case 10:
				rainbowSoftColor.RainbowSoftColorFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, new RainbowSoftColor ( blue.ToFXColor() ), new RainbowSoftColor ( oxylblue.ToFXColor() ) );
				int tempColorNum = (int)((int)( 255 * 16777216) + (int)(rainbowSoftColor.ToFXColor().getRed() * 255 * 65536) + (int)(rainbowSoftColor.ToFXColor().getGreen() * 255 * 256) + rainbowSoftColor.ToFXColor().getBlue() * 255);
				if ( rainbowSoftColor.ColorTooSimilarFunction( tempColorNum, oxylblue0FFNum ) )
					rainbowSoftColor = new RainbowSoftColor( neongreen.ToFXColor() );
				break;
			case 11:
				rainbowSoftColor.RainbowSoftColorFunction( Bounds.getWidth() / xRectangleQuantity, xSlid, new RainbowSoftColor ( purple.ToFXColor() ), new RainbowSoftColor ( oxylblue0FF.ToFXColor() ) );
				if ( rainbowSoftColor.ColorTooSimilarFunction( rainbowSoftColor.ToFXColor(), oxylblue0FF.ToFXColor() ) )
					rainbowSoftColor = new RainbowSoftColor( neongreen.ToFXColor() );
				break;
			case 12:
				if ( 0 <= rainbowSoftColor.ColorValueFitter(5000) && rainbowSoftColor.ColorValueFitter(5000) <= 255  && 0 <= rainbowSoftColor.ColorValueFitter(-5000) && rainbowSoftColor.ColorValueFitter(-5000) <= 255 )
					rainbowSoftColor = new RainbowSoftColor ( white.ToFXColor() );
				else
					rainbowSoftColor = new RainbowSoftColor ( black.ToFXColor() );
				break;
			case 13:
				if ( 0 <= rainbowSoftColor.OpacityValueFitter(100) && rainbowSoftColor.OpacityValueFitter(100) <= 1  && 0 <= rainbowSoftColor.OpacityValueFitter(-100) && rainbowSoftColor.OpacityValueFitter(-100) <= 1 )
					rainbowSoftColor = new RainbowSoftColor ( white.ToFXColor() );
				else
					rainbowSoftColor = new RainbowSoftColor ( black.ToFXColor() );
				break;
			case 14:
				rainbowSoftColor.set( new double[]{255,134,0,1} );
				break;
			case 15:
				rainbowSoftColor.set( FXColor.AQUAMARINE );
				break;
			case 16:
				rainbowSoftColor = new RainbowSoftColor ( gold.ToFXColor() );
				rainbowSoftColor.set( (double[])rainbowSoftColor.get() );
				break;
			}
			break;
		}
		this.ARGB = rainbowSoftColor.ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(rainbowSoftColor.ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.rainbowSoftColor = new RainbowSoftColor( ARGB );
		this.FXColor = rainbowSoftColor.ToFXColor();// */
		return rainbowSoftColor;
	}

	public Object RainbowSoftColorGlobalRainbowSoftSelector( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations, boolean Adjusted, Color[] FXcolorArray, /* double[][] ARGBcolorArray, */ double OpacityBefore, double OpacityAfter, boolean Reversed, boolean IsColorNum )
	{
		rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, 1, 2147483647, false, doubleBlack, 1, 1, false, false);
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, 1, 2147483647, false, doubleBlack, 1, 1, true, false);
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, 1, 2147483647, false, imperialFXcolors, 1, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, 1, 2147483647, false, imperialFXcolors, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, doubleBlack, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, doubleBlack, 1, 1, true, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, doubleBlack, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, doubleBlack, 1, 1, true, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, doubleBlack, 0, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, doubleBlack, 0, 1, true, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, imperialFXcolors, 1, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, imperialFXcolors, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, imperialFXcolors, 1, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, imperialFXcolors, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, imperialFXcolors, 0, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, imperialFXcolors, 0, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, doubleBlack, 0, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, doubleBlack, 0, 1, true, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, imperialFXcolors, 0, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, imperialFXcolors, 0, 1, false, false );// */
		return colorTransparency.ToFXColor();
	}

	//public Object RainbowSoftColor( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations, boolean Adjusted, FXcolorArray )
	//{ }

	public Boolean ColorTooSimilarFunction(ColorSlider Color1, ColorSlider Color2)
	{
		Boolean TooSimilar = false;
		int colorDifference = (int)( Math.abs(Color1.RGB[0] - Color2.RGB[0]) + Math.abs(Color1.RGB[1] - Color2.RGB[1]) + Math.abs(Color1.RGB[2] - Color2.RGB[2]) );
		if ( colorDifference <= 164 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public double ColorValueFitter ( double ColorToBeChecked )
	{
		this.ColorBeingChecked = Math.abs(ColorToBeChecked);
		while ( ColorBeingChecked > 255)
			this.ColorBeingChecked = ColorBeingChecked - 255;
		return ColorBeingChecked;
	}
	public double OpacityValueFitter ( double OpacityToBeChecked )
	{
		this.OpacityBeingChecked = Math.abs(OpacityToBeChecked);
		while ( OpacityBeingChecked > 1)
			this.OpacityBeingChecked = OpacityBeingChecked - 1;
		return OpacityBeingChecked;
	}
	public void set(double[] RGB) { this.RGB = RGB; this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) ); }//13th Square BasicDiagnosticsClass.java
	public void set(Color FXColor) { this.FXColor = FXColor; this.RGB = new double[] { ColorValueFitter(FXColor.getRed() * 255), ColorValueFitter(FXColor.getGreen() * 255), ColorValueFitter(FXColor.getBlue() * 255) }; }//14th Square BasicDiagnosticsClass.java
	public Object get() { return RGB; }
}






//www.RainbowFirm.com's Rainbow Software For Developing Variated Rainbow/Custom-Color Videos, Pictures, And Browsing
package rainbowPackage;

import java.awt.Dimension;

import javafx.application.Application;

//import android.graphics.Color;

import javafx.application.Platform;
import javafx.scene.*;
import javafx.scene.paint.Paint.*;
import javafx.scene.paint.Color.*;
import javafx.scene.Scene;
import javafx.stage.*;
import javafx.stage.Stage;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import javafx.scene.input.MouseEvent;

import javafx.event.EventHandler;
import javafx.scene.*;
import javafx.scene.image.*;
//import javafx.scene.input.KeyEvent;

import javafx.fxml.FXMLLoader;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.scene.SnapshotParameters;

import java.awt.*;
import java.awt.image.*;
//import java.awt.event.ActionEvent;
import java.awt.Dimension;
import java.lang.Object;
import java.io.InputStream;
import java.io.File;
import javax.imageio.ImageIO;//Keep For .png Image Creation
import java.io.IOException;
import java.nio.ByteBuffer;

import javafx.scene.paint.Color;
import javafx.geometry.Rectangle2D;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCombination;
import javafx.scene.input.KeyCodeCombination;
//import javafx.scene.input.KeyEvent;
import javafx.scene.layout.StackPane;
import javafx.scene.image.*;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.image.PixelReader;
import javafx.scene.image.PixelWriter;
import javafx.scene.image.WritableImage;
import javafx.scene.image.WritableImage.*;
//import javafx.scene.input.KeyEvent;
//import javafx.scene.layout.VBox;
import javafx.scene.text.*;
import javafx.stage.Screen;
import javafx.stage.Stage;
import javafx.scene.layout.*;
//import javafx.scene.shape.*;

import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.concurrent.Worker;
import javafx.concurrent.Worker.State;

import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.concurrent.Worker;
import javafx.concurrent.Worker.State;
//import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;

//import java.util.Timer;
//import java.util.TimerTask;
import java.lang.Object.*;
import org.apache.commons.io.*;
import java.io.PrintWriter;
import java.io.PrintStream;
import javax.swing.JFileChooser;
//import javafx.stage.DirectoryChooser;
//import javafx.stage.FileChooser;
import javafx.embed.swing.SwingFXUtils;
import javafx.embed.swing.SwingFXUtils.*;
//import org.openqa.selenium.By;
//import org.openqa.selenium.WebDriver;
//import org.openqa.selenium.firefox.FirefoxDriver;

//import com.sun.tools.javac.api.JavacTaskPool.Worker;

//import org.apache.commons.io.FileUtils;

//import org.openqa.selenium.OutputType;

//import org.openqa.selenium.TakesScreenshot;

import java.io.*;

import org.jcodec.api.SequenceEncoder;
import org.jcodec.api.SequenceEncoder.*;
import org.jcodec.api.awt.AWTSequenceEncoder;
import org.jcodec.common.Codec;
import org.jcodec.common.Format;
import org.jcodec.common.io.NIOUtils;
import org.jcodec.common.io.SeekableByteChannel;
import org.jcodec.common.model.Rational;
import org.jcodec.scale.AWTUtil;
import org.jcodec.api.*;
import java.nio.channels.*;
//import java.nio.channels.SeekableByteChannel;
import org.jcodec.*;//Keep For .mp4 Video Creation

//www.allaviacad.com Owns
//www.freeworldalliance.org Which Operates
//www.rainbowfirm.com Which Provides
//RainbowSoft For The Pixies To Use And Control In Their Local Area Under The Angels Of The
//www.orderofmagi.com Who Protect The
//rainbowPackage Where It All Is,
//main Starts Application
//RainbowMainBody Extends Application To Begin
//start Which Starts Threading
//Which Runs Setup
//Which Begins Engine To Deploy
//RainbodSoft2D Which Maintains Loop Of
//RainbowVideo.java Which Accesses
//RainbowColorCodeSchemes.java For Frames
//Which Uses RainbowSoftColorCodes.java Of
//RainbowSoftColorCode.java Codes Of
//VibrantColors.java Class To Configure Where Patterns Are Displayed Through Accessing
//RainbowPattern2D.java For Each Rainbow/Custom Pattern, Which Accesses
//RainbowSoftColor.java For Each Rainbow/Custom Color Determination, Which Uses
//ColorSlider.java For Variation Determination Between 2 Of Each Color Points And Can Use
//TranspaerencySlider.java As Well For Transparency Determination At The Same Time, And The
//ColorTooSimilar.java Class Is For Checking To See If 2 Colors Are To Similar For Another Color To Be Displayed Allowing Text To Be Seen Throughout
//RainbowFirm's
//Rainbow Hardware Developments That Make
//RainbowSoft's
//Proprietary Rainbow Software Which With Proper Computational Support And Expertise Makes
//Ideal Variated Rainbow/Custom Videos

/*public class RainbowMainBody {

	public RainbowMainBody() {
		// TODO Auto-generated constructor stub
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}*/
public class RainbowMainBody extends Application 
{	
	/* RainbowMainBody.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
    {
        public void handle(MouseEvent event) 
        {
            System.exit(0);
        }
    });// */
	@Override
	public void start(Stage stage) throws IOException
	{
		Thread thread = new Thread();//(() -> {

		stage.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
		{
			public void handle(MouseEvent event) 
			{
				System.exit(0);
			}
		});

		try { Thread.sleep(400); }
		catch (InterruptedException exc) { throw new Error("Unexpected interruption", exc); }
		// Update text on FX Application Thread:
		/*stage.addEventHandler(KeyEvent.KEY_RELEASED, (KeyEvent event) -> {
	        if (KeyCode.ESCAPE == event.getCode()) {
	            stage.close();
	        }
	    });//*/
		/*stage.addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
			public void handle(KeyEvent event) {
				if (changeHotkey) {
					if (addHotkey(event, changeHotkeyFunction)) {
						changeHotkey = false;
					}
				}
			}
		});//*/

		Platform.runLater(new Runnable() {
			public void run()
			{
				//@Override
				stage.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
				{
					@Override
					public void handle(MouseEvent event) 
					{
						System.exit(0);
					}
				});// */

				//try { onKeyPressed (KeyEvent); }
				//catch(IOException ie) { ie.printStackTrace(); }
				try { Setup(stage, thread ); }
				catch(IOException ie) { ie.printStackTrace(); }
			}
		});

		thread.setDaemon(true);
		thread.start();
	}

	static void Setup( Stage primaryStage, Thread primaryThread ) throws IOException
	{
		primaryStage.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
		{
			@Override
			public void handle(MouseEvent event) 
			{
				System.exit(0);
			}
		});

		primaryStage.setTitle("Sonnet");

		boolean primaryIsFullScreened = true;

		// This is how you know how much screen you can write to.
		Screen primaryScreen = Screen.getPrimary();
		Rectangle2D primaryBounds = primaryScreen.getVisualBounds();
		System.out.println(primaryBounds);

		//primaryStage.setX(0);
		//primaryStage.setY(0);
		KeyCombination fullScreenedKeyCombination = new KeyCodeCombination(KeyCode.ENTER, KeyCombination.ALT_DOWN);
		primaryStage.setFullScreenExitHint("Alt-Enter To Toggle Full-Screened Mode");
		primaryStage.setFullScreenExitKeyCombination(fullScreenedKeyCombination);

		primaryStage.setX(-100);
		primaryStage.setY(100);
		primaryStage.setWidth( 1920 ); //666
		primaryStage.setHeight( 1080 ); //888

		primaryStage.setResizable(false);

		/*primaryStage.setMaximized(true);
		primaryStage.setFullScreen(primaryIsFullScreened);
		primaryStage.show();//*/
		//primaryStage.setMaximized(true);
		/*try { primaryThread.sleep(2400); } catch(InterruptedException e) {
		    System.out.println("got interrupted!");
		}//*/
		/*
		primaryStage.show();
		primaryStage.setFullScreen(primaryIsFullScreened);


		if ( primaryIsFullScreened == false )
		{

		primaryStage.setWidth( 666 ); //666
		primaryStage.setHeight( 888 ); //888

		}
		else
		{
			primaryStage.setWidth( primaryBounds.getWidth() );
			primaryStage.setHeight( primaryBounds.getHeight() );
		}

		primaryStage.setMaximized(true);
		primaryStage.setFullScreen(primaryIsFullScreened);
		primaryStage.show();

		primaryStage.fullScreenProperty().addListener((observable, oldValue, newValue) -> {
			if ( newValue != primaryStage.isFullScreen() )
			{  	primaryStage.setFullScreen(primaryIsFullScreened);
			primaryStage.setWidth( primaryBounds.getWidth() );
			primaryStage.setHeight( primaryBounds.getHeight() );	}
			else
				return;
		}); // */
		//primaryStage.show();

		/*Dimension dimension = new Dimension( (int)bounds.getWidth(), (int)bounds.getHeight() );
		dimension.width = (int)bounds.getWidth();
		dimension.height = (int)bounds.getHeight() + 40;
		Dimension Dim = dimension;//*/

		double fRateDivisor = 7;//24//7//468 For Buddhism Testing: 4;//10;//124;//2;//10;//22<- 444 468 HERE HERE HERE DETERMINES FRAME RATE AND RAINBOW MOVEMENT RATE For Rainbow Lights

		//FXMLLoader loader = new FXMLLoader(Sonnet.class.getResource("main.fxml"));

		StackPane stackPane[] = new StackPane[(int)(fRateDivisor + 1)];
		stackPane[0] = new StackPane();
		stackPane[0].setPrefSize( primaryBounds.getWidth(), primaryBounds.getHeight() ); //+ 40 );//stackPane.setPrefSize(1920, 1080);//stackPane.setPrefSize(960, 540);
		//Image image = new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Pixies%20Text.png");

		Scene primaryScene[] = new Scene[(int)(fRateDivisor + 1)];
		ProgressBar progressBar = new ProgressBar();
		Button goButton = new Button("Go!");
		Label stateLabel = new Label();
		TextField addressBar = new TextField();
		//addressBar.setText("http://www.google.com");
		//addressBar.setText("http://www.pixies.zone/PixiesTest.html");
		WebView browser = new WebView();
		browser.resize(primaryBounds.getWidth(), primaryBounds.getHeight() );
		//browser.setMinSize(primaryBounds.getWidth(), primaryBounds.getHeight() );
		//browser.setPrefSize( primaryBounds.getWidth(), primaryBounds.getHeight() + 10 ); // Important For Full Screened
		WebEngine webEngine = browser.getEngine();
		//webEngine.load("https://news.google.com/news/?ned=us&hl=en&gl=US");
		webEngine.load( "http://www.pixies.zone/BlankWebPage.html" ); //http://www.pixies.zone/BlankWebPage.html "http://www.pixies.zone/PixiesTest%20-%20Copy%20(4).html" PixiesTest%20-%20Copy%20(2).html");// PixiesTest%20-%20Copy.html"); // ASDF For Rainbow Browser
		/*try { webEngine.wait(1000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}*/	

		//while ()
		/*try { primaryThread.sleep(10000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */
		//webEngine.load("http://www.pixies.zone/PixiesTest.html");
		//primaryStackPane[0].getChildren().add(origionalImageView);
		//stackPane[0].getChildren().add(browser);
		Image origionalBasisImage = new Image("http://www.pixies.zone/Pictures/SciMagOrderMagiEliteFullHDGreenBacking.png");//KnightsOfTheSciMagOrderNewPre1.png//BuddhismTemplateHD.png//SciMagOrderMagiEliteFullHD.png
		Image firstBackupWorkAroundImage = new Image("http://www.pixies.zone/Pictures/PixieesText.png");//BuyHempStartImage.png, PixiesWillAlwaysGetReincarnatedText.png
		JFileChooser jFileChooser = new JFileChooser();
		String path = "C:\\TestVideo.mp4", text = "Sky.Netarianism";//"C:\\TestImage.png"//"C:\\TestVideo.mp4"//"C:\\TEMP_Sonnet.mp4";
		File selectedFile = new File (path);
		File javaScriptFile = new File ("C:/Users/AllAV/Desktop/FWA Website/pixies.zone/scrollContinuously444.js");
		File xSliderFile = new File ("C:/Users/AllAV/Desktop/FWA Website/pixies.zone/xSlider.dat");
		jFileChooser.setSelectedFile(selectedFile);
		int returnValue = jFileChooser.showSaveDialog(null);
		if (returnValue == JFileChooser.APPROVE_OPTION)
		{
			selectedFile = jFileChooser.getSelectedFile();
			System.out.println(selectedFile.getName());
			System.out.println(selectedFile.getPath());
		}
		//SequenceEncoder enc = new SequenceEncoder(selectedFile);
		//try { SequenceEncoder enc = new SequenceEncoder(secondFile); }
		//catch (IOException e) {	throw new RuntimeException(e); }//*/

		//Boolean primaryFullScreened = false; //OLD OLD OLD Important For Full Screened
		Dimension firstDim = new Dimension( (int)primaryBounds.getWidth(), (int)primaryBounds.getHeight() );
		WritableImage origionalTextPicture = new WritableImage( firstDim.width, firstDim.height );//666, 888
		BufferedImage bf = null;
		try {
			bf = ImageIO.read(new File("C:\\Dev\\RainbowSoftware\\Pictures\\SciMagOrderMagiEliteFullHDGreenBacking.png") );///RainbowSoftware/Pictures/SciMagOrderMagiEliteFullHDGreenBacking.png"));
		}
		catch (IOException e) {
		}
		System.out.println( "bf = " + (bf == null) );
		/*try {
			bf = ImageIO.read(new File("C:/Dev/SciMagOrderMagiEliteFullHDGreenBacking.png"));
        } catch (IOException ex) {
            System.out.println("Image failed to load.");
        }
		//ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
		//ImageIO.write( SwingFXUtils.fromFXImage( origionalTextPicture, null ), "png", byteOutput );
		//origionalTextPicture = ImageIO.byteOutput.toByteArray();
		/*BufferedImage bf = null;
        try {
            bf = ImageIO.read(new File("C:/Dev/SciMagOrderMagiEliteFullHDGreenBacking.png"));
        } catch (IOException ex) {
            System.out.println("Image failed to load.");
        }

        //WritableImage wr = null;
        if (bf != null) {
        	origionalTextPicture = new WritableImage(bf.getWidth(), bf.getHeight());
            PixelWriter pw = origionalTextPicture.getPixelWriter();
            for (int x = 0; x < bf.getWidth(); x++) {
                for (int y = 0; y < bf.getHeight(); y++) {
                    pw.setArgb(x, y, bf.getRGB(x, y));
                }
            }
        }//*/
		//ImageView imView = new ImageView(origionalBasisImage);
		//origionalTextPicture = SwingFXUtils.toFXImage(bf, origionalTextPicture);
		//System.out.println( "origionalTextPicture = " + (origionalTextPicture == null) );
		//primaryScene[0].snapshot(SwingFXUtils.toFXImage(bf, null));//origionalTextPicture);
		//WritableImage origionalTextPicture = new WritableImage( (int)primaryBounds.getWidth(), (int)primaryBounds.getHeight() );
		/*
		//try { synchronized (webEngine) {
		//	webEngine.wait(2000);
		//} } catch (InterruptedException e) { e.printStackTrace(); }
		if ( primaryStage.isFullScreen() == false )
		{
			if ( primaryIsFullScreened != primaryStage.isFullScreen() )
			{
				primaryStage.setFullScreen(true);
				firstDim.width = 600;
				firstDim.height = 400;
			}
			else 
			{
				firstDim.width = (int)primaryStage.getWidth();
				firstDim.height = (int)primaryStage.getHeight();// + 40;
			}
			//primaryScene[0].snapshot(origionalTextPicture);
			//sP.setViewport( new Rectangle2D( (double)Dim.width, (double)Dim.height, 0, 0 ) );
			primaryStage.setScene(primaryScene[0]);
			primaryStage.setFullScreen(primaryIsFullScreened);
			primaryStage.show();// *_/

		}
		else if ( primaryIsFullScreened != primaryStage.isFullScreen() )
		{
			primaryScene[0].snapshot(origionalTextPicture);
			primaryStage.setFullScreen(primaryIsFullScreened);
			primaryStage.setWidth(primaryScreen.getBounds().getWidth());
			primaryStage.setHeight(primaryScreen.getBounds().getHeight());
			firstDim.width = (int)primaryStage.getWidth();
			firstDim.height = (int)primaryStage.getHeight();// + 40;

			//sP.setViewport( new Rectangle2D( (double)Dim.width, (double)Dim.height, 0, 0 ) );
			primaryStage.setScene(primaryScene[0]);
			primaryStage.setFullScreen(true);
			primaryStage.show();// *_/
		}// Important For Full Screened */
		System.out.println("Got To Worker");
		//Worker<Void> worker = webEngine.getLoadWorker();
		//ASDF PROBLEM PROBLEM PROBLEM BEFORE System.out.println("Not At Problem");
		//worker.stateProperty().addListener(new ChangeListener<State>() {
		//	@Override
		//	public void changed(ObservableValue<? extends State> observable, State oldValue, State newValue) {//System.out.println("Got To Worker Test");
		//		stateLabel.setText("Loading state: " + newValue.toString());
		//		if (newValue == Worker.State.SUCCEEDED) {System.out.println("Not At Problem");
		try { RainbowSystem(primaryStage, origionalBasisImage, /*firstBackupWorkAroundImage,*/ webEngine, browser, stackPane, primaryScene, primaryScreen, fRateDivisor, stateLabel, jFileChooser.getSelectedFile(), javaScriptFile, xSliderFile, primaryThread, primaryIsFullScreened, firstBackupWorkAroundImage ); }//, enc
		catch (IndexOutOfBoundsException e) { System.err.println("IndexOutOfBoundsException: " + e.getMessage()); }
		//}
		//}
		/*scene[(int)fRateDivisor].setOnKeyReleased(new EventHandler<KeyEvent>()
				{
					@Override
					public void handle(KeyEvent event)
					{
						if ( event.isAltDown() == true)
						{
							switch (event.getCode())
							{
							case ENTER: primaryStage.setFullScreen(!primaryStage.isFullScreen()); break;
							}
						}
					}
				});//*/
		/*try { RainbowSystem(primaryStage, browser, stackPane, scene, screen, fRateDivisor, stateLabel, selectedFile); }//enc,
				catch (IOException e) {	throw new RuntimeException(e); }//*/
		//}
		//});



		primaryStage.setScene(primaryScene[0]);// ???
		primaryStage.setFullScreen(primaryIsFullScreened);
		primaryStage.show();

		//progressBar.progressProperty().bind(worker.progressProperty());



		/*goButton.setOnAction(new EventHandler<ActionEvent>() {

			@Override
			public void handle(ActionEvent event) {
				String url = addressBar.getText();
				// Load the page.
				webEngine.load(url);
			}
		});//*/
	}





	public static void RainbowSystem (Stage secondaryStage, Image basisImage, WebEngine secondBrowserEngine, WebView secondBrowser, StackPane secondStackPane[], Scene secondScene[], Screen secondScreen,
			double secondFRateDivisor, Label SecondStateLabel, File secondFile, File secondJavaScriptFile, File secondXSliderFile, Thread secondaryThread, boolean secondaryIsFullScreened,
			Image secondaryBackupWorkAroundImage)//SequenceEncoder secondEnc, Image secondBackupWorkAroundImage, 
	{
		System.out.println("Got To The Top Of Worker");
		secondaryStage.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
		{
			@Override
			public void handle(MouseEvent event) 
			{
				System.exit(0);
			}
		});
		secondaryStage.setFullScreen(secondaryIsFullScreened);
		/*try ( PrintWriter out = new PrintWriter(secondJavaScriptFile.getPath() ) )
		{

			out.println("function scrollContinuously( timeInterval )\r\n" + 
					"{\r\n" + 
					"	timeInterval = 444;\r\n" + 
					"	window.setInterval( scrollWin, timeInterval );\r\n" + 
					"}\r\n" + 
					"function scrollWin()\r\n" + 
					"{\r\n" + 
					"    window.scrollBy( 0, 0 );\r\n" + 
					"}");
			out.close();
		}
		catch(IOException ie) { ie.printStackTrace(); }// Important For Browser AutoScrolling */


		secondaryStage.fullScreenProperty().addListener((observable, oldValue, newValue) -> {
			if ( newValue != secondaryStage.isFullScreen() )
			{
				secondaryStage.setFullScreen(secondaryIsFullScreened);
				//secondaryStage.setWidth( primaryBounds.getWidth() );
				// secondaryStage.setHeight( secondaryBounds.getHeight() );
			}
			else
				return;
		});// Important For Full Screened */

		secondaryStage.fullScreenProperty().addListener((observable, oldValue, newValue) -> {
			if ( newValue == secondaryStage.isFullScreen() )
			{
				secondaryStage.setFullScreen(secondaryIsFullScreened);
				secondaryStage.setWidth( secondScreen.getBounds().getWidth() );
				secondaryStage.setHeight( secondScreen.getBounds().getHeight() );
			}
			else
				return;
		});// Important For Not Full Screened */

		System.out.println("Got In Worker Past Full Screening");
		// This is how you know how much screen you can write to.
		Screen screen = Screen.getPrimary();
		Rectangle2D bounds = screen.getVisualBounds();
		System.out.println(bounds);

		//secondaryStage.setMaximized(true);
		//secondaryStage.setFullScreen(true); Improtant For Full Screened
		secondaryStage.setFullScreen(secondaryIsFullScreened);
		Dimension dimension = new Dimension( (int)bounds.getWidth(), (int)bounds.getHeight() );
		//Dimension dimension = new Dimension( 666, 888 );// 666, 888
		//dimension.width = (int)bounds.getWidth();// All Around Here Important For Full Screened
		//dimension.height = (int)bounds.getHeight();// + 40;
		Dimension Dim = dimension;// */

		//Dimension Dim = new Dimension();
		//Dim.width = (int)secondaryStage.getWidth(); // Important For Full Screened
		//Dim.height = (int)secondaryStage.getHeight();// + 40; // Important For Full Screened Without + 40
		secondaryStage.setFullScreen(secondaryIsFullScreened);
		secondaryStage.setTitle(secondBrowser.getEngine().getLocation());
		SecondStateLabel.setText("Finish!");
		secondaryStage.setFullScreen(secondaryIsFullScreened);
		//SequenceEncoder enc = new SequenceEncoder(secondFile);
		//try { SequenceEncoder enc = new SequenceEncoder(secondFile); }
		//catch (IOException e) {	throw new RuntimeException(e); }//*/


		if ( secondaryIsFullScreened == false )
		{
			secondBrowser.autosize();
			secondBrowser.resize( 666, 888 );
		}
		SnapshotParameters sP = new SnapshotParameters();
		//sP.setViewport( new Rectangle2D(-8, -19, 666, 888 ) );
		//secondBrowser.resizeRelocate( -8, -19, 666, 888 );

		//WritableImage origionalTextPicture = new WritableImage( Dim.width, Dim.height );
		WritableImage bufferPicture = new WritableImage( Dim.width, Dim.height );
		//origionalTextPicture = secondBrowser.snapshot(null, bufferPicture);
		//secondBrowser.snapshot(sP, bufferPicture);
		secondaryStage.show();
		WritableImage nextTextPicture = new WritableImage( Dim.width, Dim.height ), bufferPicure = new WritableImage( Dim.width, Dim.height );
		//secondBrowser.snapshot(sP, nextTextPicture);
		/*//Image origionalBrowserImage = new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Pixies%20Text.png");//browser.snapshot(sP, nextTextPicture);//new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Pixies%20Text.png");//
			//Image origionalBrowserImage = new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Test.png");//browser.snapshot(sP, nextTextPicture);//new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Pixies%20Text.png");//
			stackPane[0].getChildren().add(browser);

			scene[0] = new Scene(stackPane[0]);
			secondaryStage.setScene(scene[0]);

			secondaryStage.setFullScreen(true);
			secondaryStage.show();

			//boolean encFinished = false;
			//while (encFinished =  false)
				//if ( stateLabel.getText() == "Finish!")//secondaryStage.isShowing() && secondaryStage.isFullScreen() )
				//{*/
		//secondStackPane[0].getChildren().add(secondBrowser);
		Image origionalBrowserImage = secondaryBackupWorkAroundImage;
		//Image origionalBrowserImage = secondBrowser.snapshot(sP, nextTextPicture);		/*sP.setViewport(secondScreen.getBounds());
		secondStackPane[0] = new StackPane();
		//while ( secondBrowser.isVisible() == false )//fdsa
		//try { secondaryThread.wait();
		//} catch (InterruptedException e) {
		//	System.out.println("Interrupted.");
		//}
		secondStackPane[0].getChildren().add(secondBrowser);
		secondScene[0] = secondStackPane[0].getScene();
		secondScene[0] = new Scene(secondStackPane[0]);
		secondaryStage.setFullScreen(secondaryIsFullScreened);
		//while ( secondBrowser.isVisible() && secondaryStage.isShowing() )//fdsa
		//	try {

		//double xSlider = 0; //MUST START OUT AS 0 Or Else Video Won't Produce Or Potentially Scroll At All!
		secondBrowser.autosize();

		//secondBrowser.resize(1080, 1930 );
		System.out.println("Got To Main Listener");
		secondBrowserEngine.getLoadWorker().stateProperty().addListener(
				new ChangeListener() {
					public void changed(ObservableValue observable, Object oldValue, Object newValue) {
						secondaryStage.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
						{
							@Override
							public void handle(MouseEvent event) 
							{
								System.exit(0);
							}
						});
						System.out.println("oldValue: " + oldValue);
						System.out.println("newValue: " + newValue);
						secondaryStage.setFullScreen(secondaryIsFullScreened);
						if (newValue == Worker.State.SUCCEEDED) {
							//document finished loading
							System.out.println("Worker State:" + Worker.State.values());
							secondaryStage.setFullScreen(secondaryIsFullScreened);
							System.out.println("Worked Till After Here");
							//sP.setViewport(secondScreen.getBounds());
							//sP.setViewport( new Rectangle2D(-8, -19, 666, 888 ) );
							secondStackPane[0] = new StackPane();
							//while ( secondBrowser.isVisible() == false )//fdsa
							//try { secondaryThread.wait();
							//} catch (InterruptedException e) {
							//	System.out.println("Interrupted.");
							//}
							secondStackPane[0].getChildren().add(secondBrowser);
							secondScene[0] = secondStackPane[0].getScene();
							secondScene[0] = new Scene(secondStackPane[0]);
							secondaryStage.setFullScreen(secondaryIsFullScreened);
							secondaryStage.show();
							System.out.println("Worked Till After 1.5");
							//origionalBrowserImage = secondBrowser.snapshot(sP, nextTextPicture);
							Image currentBrowserImage = origionalBrowserImage;// !!!!! Uncomment To Show Video !!!!!
							System.out.println("Worked Till After 1.6");
							//origionalBrowserImage = secondScene[0].snapshot(nextTextPicture);
							//origionalBrowserImage = secondStackPane[0].getScene().snapshot(bufferPicure);
							secondaryStage.setScene(secondScene[0]);
							System.out.println("Worked Till After 1.7");
							//secondaryStage.setFullScreen(secondaryIsFullScreened);
							System.out.println("Worked Till After 1.8");
							/*try { secondaryThread.sleep(4000);
							} catch (InterruptedException e) {
								System.out.println("Interrupted.");
							}// */
							secondaryStage.show();// !!!!! Uncomment To Show Video !!!!!
							//origionalBrowserImage = secondBrowser.snapshot(sP, bufferPicure);
							System.out.println("Got Stopped Up Show Command In");
							//origionalBrowserImage = secondBrowser.snapshot(sP, bufferPicture);//new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Pixies%20Text.png");
							currentBrowserImage = origionalBrowserImage;// !!!!! Uncomment To Show Video !!!!!
							///TEST
							//secondStackPane[0].getChildren().add(secondBrowser);

							PixelReader origionalpr = origionalBrowserImage.getPixelReader();
							origionalpr = origionalBrowserImage.getPixelReader();//ASDF HERE HERE For Rainbow Browser
							//PixelReader origionalpr = secondBackupWorkAroundImage.getPixelReader();
							//origionalpr = secondScene[0].snapshot(bufferPicure).getPixelReader();//ASDF HERE HERE For Rainbow Browser
							//bufferPicure = new WritableImage( Dim.width, Dim.height );
							//origionalpr = secondStackPane[0].getScene().snapshot(bufferPicure).getPixelReader();
							PixelWriter origionalpw = bufferPicture.getPixelWriter();
							ImageView origionalImageView = new ImageView();
							origionalImageView.setImage(basisImage);//origionalBrowserImage
							//origionalImageView.setImage(origionalBrowserImage); //ASDF FOR RAINBOW BROWSER
							//origionalImageView.setImage(secondBackupWorkAroundImage);



							//secondScene[0].setRoot(secondBrowser);

							//secondStackPane[0].getChildren().add(origionalImageView);
							//secondStackPane[0].getChildren().add(secondBrowser);


							/*File tempFile;
					//WebDriver driver=new FirefoxDriver();

					// Maximize the window
					driver.manage().window().maximize();

					// Pass the url
					driver.get("http://www.pixies.zone/PixiesTest.html");

					// Take screenshot and store as a file format
					File src= ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
					try {// now copy the  screenshot to desired location using copyFile //method
						FileUtils.copyFile(src, new File("C:/TempImage.png"));
					}

					catch (IOException e)
					{
						System.out.println(e.getMessage());

					}// */
							System.out.println("Worked Till After Here 2");
							PixelReader basispr = basisImage.getPixelReader();
							WritableImage writableImage = nextTextPicture; //USE FOR ???
							PixelReader pr = writableImage.getPixelReader();
							PixelWriter pw = writableImage.getPixelWriter();
							ImageView imageView = new ImageView();
							imageView.setImage(writableImage);

							double numberOfScrollFrames = 9999;//Testing 2; Normally 11;

							ColorSlider black = new ColorSlider( new double[]{0,0,0} );

							//ColorSlider color = black;
							Diagnostics diagnostics = new Diagnostics( secondScreen.getBounds() );
							RainbowSoftColor color = new RainbowSoftColor( new double[]{0,0,0,1} );//????????????????????????????
							RainbowPattern2D pattern2D = new RainbowPattern2D( new double[]{0,0,0,1} );
							TransparencySlider transparencySlider = new TransparencySlider( new double[]{0,0,0,1} );
							RainbowSoftColor rainbowSoftColor = new RainbowSoftColor( new double[]{0,0,0,1} );
							Color tempFXColor = Color.BLACK;

							TransparencySlider redTransparencySlider = new TransparencySlider( new double[]{193,0,0,1} );
							TransparencySlider blueTransparencySlider = new TransparencySlider( new double[]{0,0,192,1} );

							ColorSlider white = new ColorSlider( new double[]{255,255,255} );
							ColorSlider skyblue = new ColorSlider( new double[]{134,206,249} );
							ColorSlider oxylblue = new ColorSlider( new double[]{0,255,255} );
							ColorSlider pink = new ColorSlider( new double[]{255,64,143} );
							ColorSlider blue = new ColorSlider( new double[]{0,0,192} );
							ColorSlider red = new ColorSlider( new double[]{193,0,0} );
							ColorSlider purple = new ColorSlider( new double[]{122,0,178} );
							ColorSlider orange = new ColorSlider( new double[]{255,134,0} );
							ColorSlider green = new ColorSlider( new double[]{0,133,50} );
							ColorSlider yellow = new ColorSlider( new double[]{246,252,15} );
							ColorSlider teal = new ColorSlider( new double[]{3,224,149} );
							ColorSlider bronze = new ColorSlider( new double[]{152,123,46} );
							ColorSlider silver = new ColorSlider( new double[]{193,192,192} );
							ColorSlider gold = new ColorSlider( new double[]{205,191,44} );
							ColorSlider lime = new ColorSlider( new double[]{126,193,33} );
							ColorSlider brown = new ColorSlider( new double[]{131,103,71} );
							ColorSlider neongreen = new ColorSlider( new double[]{0,255,0} );
							ColorSlider oxylblue0FF = new ColorSlider( new double[]{0,255,255} );

							ColorTooSimilar neonGreenCheck = new ColorTooSimilar();

							int transparentNum = (int)(0 * 16777216) + (int)(0 * 65536) + (int)(0 * 256) + 0;
							int oxylBlueNum = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(246 * 256) + 255;
							int oxylBlue0FFNum = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(255 * 256) + 255;
							int skyBlueNum = (int)(255 * 16777216) + (int)(135 * 65536) + (int)(206 * 256) + 250;
							int magentaNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(0 * 256) + 255;
							int halfGreyNum = (int)(255 * 16777216) + (int)(127 * 65536) + (int)(127 * 256) + 127;
							int pinkNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(64 * 256) + 143;
							int maroonNum = (int)(255 * 16777216) + (int)(167 * 65536) + (int)(0 * 256) + 118;
							int shitBrownNum = (int)(255 * 16777216) + (int)(110 * 65536) + (int)(82 * 256) + 48;
							int simpleBlueNum = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(0 * 256) + 255;
							int neonGreenNum = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(255 * 256) + 0;
							int webBlackNum = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(0 * 256) + 0;
							int whiteNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(255 * 256) + 255;

							int redNum = (int)(255 * 16777216) + (int)(193 * 65536) + (int)(0 * 256) + 0;
							int orangeNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(134 * 256) + 0;
							int yellowNum = (int)(255 * 16777216) + (int)(246 * 65536) + (int)(252 * 256) + 15;
							int tealNum = (int)(255 * 16777216) + (int)(3 * 65536) + (int)(224 * 256) + 149;
							int greenNum = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(133 * 256) + 50;
							int blueNum = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(0 * 256) + 192;
							int purpleNum = (int)(255 * 16777216) + (int)(122 * 65536) + (int)(0 * 256) + 178;

							int white1Num = (int)(255 * 16777216) + (int)(254 * 65536) + (int)(254 * 256) + 254;
							int white2Num = (int)(255 * 16777216) + (int)(253 * 65536) + (int)(253 * 256) + 253;
							int white3Num = (int)(255 * 16777216) + (int)(252 * 65536) + (int)(252 * 256) + 252;
							int white4Num = (int)(255 * 16777216) + (int)(251 * 65536) + (int)(251 * 256) + 251;
							int blackRedNumArray[] = new int[18];
							for (int blackRedNum = 1; blackRedNum <= 18; blackRedNum++)
								blackRedNumArray[blackRedNum - 1] = (int)(255 * 16777216) + (int)(blackRedNum * 65536) + (int)(0 * 256) + 0;
							int blackBlueNumArray[] = new int[18];
							for (int blackBlueNum = 1; blackBlueNum <= 18; blackBlueNum++)
								blackBlueNumArray[blackBlueNum - 1] = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(0 * 256) + blackBlueNum;
							int blackGreenNumArray[] = new int[4];
							for (int blackGreenNum = 1; blackGreenNum <= 4; blackGreenNum++)
								blackGreenNumArray[blackGreenNum - 1] = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(blackGreenNum * 256) + 0;
							int blackPurpleNumArray[] = new int[4];
							for (int blackPurpleNum = 1; blackPurpleNum <= 4; blackPurpleNum++)
								blackPurpleNumArray[blackPurpleNum - 1] = (int)(255 * 16777216) + (int)(blackPurpleNum * 65536) + (int)(0 * 256) + blackPurpleNum;
							int black6Num = (int)(255 * 16777216) + (int)(6 * 65536) + (int)(6 * 256) + 6;
							int wheelOuterRingNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(204 * 256) + 3;
							int wheelMiddleRingNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(204 * 256) + 1;
							int wheelInnerRingNum = (int)(255 * 16777216) + (int)(212 * 65536) + (int)(170 * 256) + 1;
							int wheelRodsNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(204 * 256) + 2;
							int wheelEndsNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(204 * 256) + 4;
							int wheelTipsNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(204 * 256) + 5;
							int wheelDiamondsNum = (int)(255 * 16777216) + (int)(255 * 65536) + (int)(204 * 256) + 6;
							int wheelDiamondsArrayNum[] = { whiteNum, redNum, orangeNum, yellowNum, tealNum, greenNum, blueNum, purpleNum };

							int numberOfColorsInTheRainbow = 7;//asdf Always Worry About This!

							Color[] imperialFXcolors = new Color[] {green.ToFXColor(), blue.ToFXColor(), purple.ToFXColor(), blue.ToFXColor(), green.ToFXColor()};
							double[][] imperialColorsNum = {green.RGB, blue.RGB, purple.RGB, purple.RGB, blue.RGB, green.RGB};
							Color[] imperialFXcolorsReverse = new Color[] {red.ToFXColor(), orange.ToFXColor(), gold.ToFXColor(), orange.ToFXColor(), red.ToFXColor()};
							double[][] imperialColorsReverseNum = {red.RGB, orange.RGB, gold.RGB, gold.RGB, orange.RGB, red.RGB};
							Color[] doubleBlack = new Color[] { black.ToFXColor(), black.ToFXColor() };

							//System.out.println( "imperialFXcolors Brightnesses" + imperialFXcolors[0].getBrightness() + imperialFXcolors[1].getBrightness() + imperialFXcolors[2].getBrightness() + imperialFXcolors[3].getBrightness() + imperialFXcolors[4].getBrightness() + imperialFXcolors[5].getBrightness() );

							//Dimension HalfedDim = new Dimension();
							//HalfedDim.width = Math.round( ( Dim.width + 1 ) / 2 - 1 );
							//HalfedDim.height = Math.round( ( Dim.height + 1 ) / 2 - 1 );
							int x = 0, y = 0, xMinusxSlider = 0, yMinusxSlider = 0, ySlider = 0, yMinusySlider = 0, cyMy = 0,  b = 0, xSliderFactor = 1, xSliderBackAndFourth = 1, fixedOfabcd = 4, numOfabcd = 4, colorIntervalDivisor = 1, aCounter = 0, bCounter = 0, cCounter = 0;//cxMx Corrected xMinusSlider for determining color
							double a = 0, colorIntervalForWholeScreen = Dim.width / ( numberOfColorsInTheRainbow - 1 ), numberOfClockHandsForRainbow = 7, numberOfColorsForOrderOfMagi = 3, numberOfClockHandsForOrderOfMagi = 16, abcd = 0, abc = 0, rCheck = 0, aAngle = 0, bAngle = 0, newx = 0, newy = 0, abc2 = 0, aIncrementAngle = 0, bIncrementAngle = 0, aTan = 0, cxMx = 0;
							boolean TrispectralRainbow = false, someTargetColorHit = false, greenBlueGreenUsed = false, someTargetColorInTheCenterHit = false, otherBrowserColorHit = false, makePixelTransparent = false, scrollHappened = false;
							if (TrispectralRainbow == true)
								colorIntervalForWholeScreen = colorIntervalForWholeScreen / 3;//For Trispectral Rainbow.
							double colorDisplacement = 0;//For Rainbow Disk And 0 Rainbow Clock
							//double radialDistance = Math.pow(Math.pow(HalfedDim.width + 1, 2) + Math.pow(HalfedDim.height + 1, 2), 0.5);
							double angle1 = 0, angle2 = 0, angle3 = 0, angle4 = 0, aAngleCheck = 0;
							double radius = 0;
							double angle = 0;

							/*int xprDisplacement = -8;
							int yprDisplacement = -19;
							int xpwDisplacement = -7;
							int ypwDisplacement = -18;// */

							double xSlider = 0; //MUST START OUT AS 0 Or Else Video Won't Produce Or Potentially Scroll At All!
							Dimension HalfedDim = new Dimension();
							HalfedDim.width = Math.round( ( Dim.width + 1 ) / 2 - 1 );
							HalfedDim.height = Math.round( ( Dim.height + 1 ) / 2 - 1 );
							double radialDistance = Math.pow(Math.pow(HalfedDim.width + 1, 2) + Math.pow(HalfedDim.height + 1, 2), 0.5);
							double fullAngle = Math.PI * radialDistance;

							//int varGradAdjGradChoiceNum = 0;//Variated = 0, Graduated = 1, Adjusted-Graduated = 2
							
							//double fullAngle = Math.PI * radialDistance;
							double sliderInterval = fullAngle / secondFRateDivisor;// / 10 For Rainbow Spotlight Last Division Determines The Frame Rate
							colorIntervalForWholeScreen = fullAngle / ( numberOfColorsInTheRainbow - 1 );//For Rainbow Clock And Spiral
							///double interval = radialDistance * 2 * Math.PI / 1444;//1444 Instead Of 14 Gets The Frame Rate To Have Contiguous Motion For Rainbow Clock
							//double fullAngle = 2 * Math.PI * radialDistance;//For Rainbow Clock
							//colorIntervalForWholeScreen = fullAngle / ( numberOfColorsInTheRainbow - 1 ) / numberOfClockHands;//For Rainbow Clock
							//for (xSlider = (int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHands / 2; xSlider < 1.5 * ( radialDistance * 2 * Math.PI / numberOfClockHands ); xSlider++)// < For Rainbow Clock, xSlider = (int)Math.round(colorDisplacement); For Rings -144 Use cy And < HalfedDim.height Instead of Dim.height For Circular Rainbow Use Dim.width < For Rainbow Slider And Fractal //Start At -144 For Videos And Pictures
							System.out.println("Got To Main Program Loop. Dim = " + Dim);
							final double chrysanthemumRadius = 60;
							final double chrysanthemumInnerRadius = 9;
							final double chrysanthemumYDisplacement = 25;
							final double chrysanthemumNumberOfPedals = 16;
							double coreVariable = 0, angleVariable = 0, aVariable = 0, radiusVariable = 0, fullCycleVariable = 0, colorDisplacementVariable = 0, colorIntervalVariable = 0, speedIncreaseFactor = numberOfColorsInTheRainbow, speedDecreaseFactor = 1 / numberOfColorsInTheRainbow;
							double radialVariableDistance = 0;//Hypnosis Spiral
							double diskColorInterval = Dim.width / ( numberOfColorsInTheRainbow - 1 );//Rainbow Disk
							double ringColorInterval = diskColorInterval * 0.175979734764;//Rainbow Ring
							double ringcolorDisplacement = HalfedDim.height * (1 - 0.175979734764);
							double fullScrollCycle =  sliderInterval * 11 * 1904;//1904 Scroll Height In Pixels
							/*try ( PrintWriter in = new PrintWriter(secondXSliderFile.getPath() ) )
							{
								try{
									xSlider = Double.parseDouble( in.toString() );
								}catch(NumberFormatException ex){ // handle your exception
									ex.printStackTrace();
								}
								//xSlider = Double.parseDouble( in.toString() );
								in.close();
							}
							catch(IOException ie) { ie.printStackTrace(); }// Important For Browser AutoScroll*/

							SeekableByteChannel videoOut = null;
							try
							{
								videoOut = NIOUtils.writableFileChannel( secondFile.getPath() );
								// for Android use: AndroidSequenceEncoder
								//try {
								BufferedImage bImage = null;
								AWTSequenceEncoder encoder = new AWTSequenceEncoder(videoOut, Rational.R(25, 1));
								//} catch(IOException ie) { ie.printStackTrace(); }
								System.out.println("xSlider: " + xSlider);
								while ( xSlider < fullAngle)//fullScrollCycle / 4000 )// For Scrolling; xSlider < fullScrollCycle / 4000 . For MagiElite: fullAngle / 10)//for (xSlider = 0; xSlider <= 0.175979734764 * cy; xSlider++)
								{//0.175979734764 *
									secondaryStage.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
									{
										@Override
										public void handle(MouseEvent event) 
										{
											System.exit(0);
										}
									});
									try { secondaryThread.sleep(4000);
									} catch (InterruptedException e) {
										System.out.println("Interrupted.");
									}


									System.out.println("Worked Till After 4 Second Wait");
									//secondaryStage.setFullScreen(secondaryIsFullScreened); //Important For Full Screening
									//dimension = new Dimension( (int)bounds.getWidth(), (int)bounds.getHeight() );
									//dimension.width = 666;// Important For Full Screened
									//dimension.height = 888;// + 40; // Important For Full Screened Not + 40 Too
									//dimension.width = (int)bounds.getWidth();// Important For Full Screened
									//dimension.height = (int)bounds.getHeight();// + 40;// Important For Full Screened
									//Dim = dimension;// */
									/*if ( secondaryStage.isFullScreen() == false )
									{
										if ( secondaryIsFullScreened != secondaryStage.isFullScreen() )
										{
											secondaryStage.setFullScreen(secondaryIsFullScreened);
											Dim.width = 600;
											Dim.height = 400;
										}
										else 
										{
											Dim.width = (int)secondaryStage.getWidth();
											Dim.height = (int)secondaryStage.getHeight();// + 40;
										}
										sP.setViewport( new Rectangle2D( (double)Dim.width, (double)Dim.height, 0, 0 ) );
										////sP.setViewport( new Rectangle2D(-8, -19, 666, 888 ) );
										//origionalBrowserImage = secondBrowser.snapshot(sP, nextTextPicture);
										//Image origionalBrowserImage = secondScene[(int)(secondFRateDivisor * xSlider/fullAngle)].snapshot(nextTextPicture);
										//origionalBrowserImage = secondScene[(int)(secondFRateDivisor * xSlider/fullAngle)].snapshot(nextTextPicture);
										//origionalBrowserImage = secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle)].getScene().snapshot(bufferPicture);
										secondaryStage.setScene(secondScene[(int)(secondFRateDivisor * xSlider/fullAngle)]);
										secondaryStage.setFullScreen(secondaryIsFullScreened);
										secondaryStage.show();// *_/

										basispr = basisImage.getPixelReader();

										origionalpr = origionalBrowserImage.getPixelReader();//ASDF HERE HERE For Rainbow Browser
										//origionalpr = secondBackupWorkAroundImage.getPixelReader();
										origionalpr = secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle)].getScene().snapshot(bufferPicture).getPixelReader();//ASDF HERE HERE For Rainbow Browser
										origionalpw = bufferPicture.getPixelWriter();
										origionalImageView = new ImageView();
										origionalImageView.setImage(origionalBrowserImage);//ASDF HERE HERE For Rainbow Browser
										//origionalImageView.setImage(secondBackupWorkAroundImage);

									}
									else if ( secondaryIsFullScreened != secondaryStage.isFullScreen() )
									{
										secondaryStage.setFullScreen(secondaryIsFullScreened);
										secondaryStage.setWidth(secondScreen.getBounds().getWidth());
										secondaryStage.setHeight(secondScreen.getBounds().getHeight());
										Dim.width = (int)secondaryStage.getWidth();
										Dim.height = (int)secondaryStage.getHeight();// + 40;

										sP.setViewport( new Rectangle2D( (double)Dim.width, (double)Dim.height, 0, 0 ) );
										////sP.setViewport( new Rectangle2D(-8, -19, 666, 888 ) );
										//origionalBrowserImage = secondBrowser.snapshot(sP, nextTextPicture);
										//Image origionalBrowserImage = secondScene[(int)(secondFRateDivisor * xSlider/fullAngle)].snapshot(nextTextPicture);
										//origionalBrowserImage = secondScene[(int)(secondFRateDivisor * xSlider/fullAngle)].snapshot(nextTextPicture);
										//origionalBrowserImage = secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle)].getScene().snapshot(bufferPicture);
										secondaryStage.setScene(secondScene[(int)(secondFRateDivisor * xSlider/fullAngle)]);
										secondaryStage.setFullScreen(secondaryIsFullScreened);
										secondaryStage.show();// *_/

										basispr = basisImage.getPixelReader();

										origionalpr = origionalBrowserImage.getPixelReader();//ASDF HERE HERE For Rainbow Browser
										//origionalpr = secondBackupWorkAroundImage.getPixelReader();
										origionalpr = secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle)].getScene().snapshot(bufferPicture).getPixelReader();//ASDF HERE HERE For Rainbow Browser
										origionalpw = bufferPicture.getPixelWriter();
										origionalImageView = new ImageView();
										origionalImageView.setImage(origionalBrowserImage);//ASDF HERE HERE For Rainbow Browser
										//origionalImageView.setImage(secondBackupWorkAroundImage);
									}// */
									secondaryStage.setScene(secondScene[(int)(secondFRateDivisor * xSlider/fullAngle)]);
									//secondaryStage.setFullScreen(secondaryIsFullScreened);
									if ( secondaryIsFullScreened == false )
									{
										secondaryStage.setWidth(666);
										secondaryStage.setHeight(888);
										secondaryStage.setFullScreen(false);
										secondaryStage.show();
									}
									System.out.println("Worked Till After Full Screen Enforcement");

									int lengthOfColorBar = 0;
									y = HalfedDim.height;
									for (x = 0; x < Dim.width; x++)
										if ( basispr.getArgb( x, y ) == blackBlueNumArray[16] )
											lengthOfColorBar++;
									int outerRingRadius = 293, outerRingThickness = 72;//outerRingThickness = 65;
									int middleRingRadius = 88, middleRingThickness = 20;
									int innerRingRadius = 66, innerRingThickness = 18;
									/*boolean ringRadiusFound = false;
									y = HalfedDim.height;
									for (x = 0; x < Dim.width; x++)
										if ( basispr.getArgb( x, y ) == wheelMiddleRingNum )
										{
											if ( ringRadiusFound == false )
											{
												middleRingRadius = HalfedDim.width - x + 1;
												ringRadiusFound = true;
											}
											middleRingThickness++;
										}
									middleRingThickness = middleRingThickness / 2;
									y = HalfedDim.height;
									ringRadiusFound = false;
									for (x = 0; x < Dim.width; x++)
										if ( basispr.getArgb( x, y ) == wheelInnerRingNum )
										{
											if ( ringRadiusFound == false )
											{
												innerRingRadius = HalfedDim.width - x + 1;
												ringRadiusFound = true;
											}
											innerRingThickness++;
										}
									innerRingThickness = innerRingThickness / 2;// */
									//System.out.println("lengthOfColorBar = " + lengthOfColorBar); 
									boolean aColorBarHit = false;
									int maxIndexOfHorizontalColorBars = 17, maxIndexOfVerticalColorBars = 3, colorBarIndex = 0, colorBarCheck = 0, colorBarDistance = 0;									
									boolean aWheelDiamondHit = false;
									int eightColorDiamondsIndex = 0;
									boolean wheelTipsHit = false;
									/*Dim.width = (int)secondaryStage.getWidth();
									Dim.height = (int)secondaryStage.getHeight() + 40;
									Dim = Dim;//*/
									//secondStackPane[(int)(secondFRateDivisor * (xSlider - interval)/fullAngle) + 1].getChildren().add(browser);
									//origionalpr = secondStackPane[(int)(secondFRateDivisor * (xSlider - interval)/fullAngle) + 1].getScene().snapshot(bufferPicure).getPixelReader();
									//Dim = f.getSize();//Dim = f.getContentPane().getSize();
									HalfedDim.width = Math.round( ( Dim.width + 1 ) / 2 - 1 );
									HalfedDim.height = Math.round( ( Dim.height + 1 ) / 2 - 1 );
									radialDistance = Math.pow(Math.pow(HalfedDim.width + 1, 2) + Math.pow(HalfedDim.height + 1, 2), 0.5);
									rCheck = HalfedDim.height / fixedOfabcd;
									numOfabcd = (int)Math.ceil(radialDistance / HalfedDim.height);
									//double[] angle = new double[numOfabcd], abcdefg = new double[numOfabcd];
									colorDisplacement = 0;//For Rainbow Disk
									System.out.println("Got To Primary for Statement");
									for (x = 0; x < Dim.width; x++)//Comment Out Here For Circular Rainbow
									{//Comment Out Here For Circular Rainbow
										for (y = 0; y < Dim.height; y++)
										{// coreVariable // angleVariable // aVariable // radiusVariable // fullCycleVariable // colorDisplacementVariable // colorIntervalVariable XXXXXX // speedIncreaseFactor // speedDecreaseFactor
											someTargetColorHit = true;
											someTargetColorInTheCenterHit = false;
											greenBlueGreenUsed = false;
											otherBrowserColorHit = false;
											makePixelTransparent = false;
											aColorBarHit = false;
											aWheelDiamondHit = false;
											wheelTipsHit = false;

											/*for ( colorBarIndex = 0; colorBarIndex <= maxIndexOfHorizontalColorBars; colorBarIndex++)
												if ( basispr.getArgb( x, y ) == blackBlueNumArray[colorBarIndex] )
												{
													colorBarDistance = 0;
													for ( colorBarCheck = x; colorBarCheck >= 0; colorBarCheck--)
													{
														if ( basispr.getArgb( colorBarCheck, y ) == blackBlueNumArray[colorBarIndex] )
															colorBarDistance++;
														else
															break;
													}
													if ( colorBarIndex == 17 )
														colorBarDistance = colorBarDistance + 8;
													coreVariable = colorBarDistance - Math.pow( xSlider / sliderInterval * ( colorBarIndex + 1 ) , 0.5 );
													colorIntervalVariable = lengthOfColorBar / ( numberOfColorsInTheRainbow - 1 );
													while ( coreVariable < 0 )
														coreVariable = coreVariable + colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) ;
													while ( coreVariable > colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) )
														coreVariable = coreVariable - colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) ;
													aColorBarHit = true;
													//someTargetColorHit = true;
												}
											for ( colorBarIndex = 0; colorBarIndex <= maxIndexOfHorizontalColorBars; colorBarIndex++)
												if ( basispr.getArgb( x, y ) == blackRedNumArray[colorBarIndex] )
												{
													colorBarDistance = 0;
													for ( colorBarCheck = x; colorBarCheck <= Dim.width; colorBarCheck++)
													{
														if ( basispr.getArgb( colorBarCheck, y ) == blackRedNumArray[colorBarIndex] )
															colorBarDistance++;
														else
															break;
													}
													if ( colorBarIndex == 17 )
														colorBarDistance = colorBarDistance + 8;
													coreVariable = colorBarDistance - Math.pow( xSlider / sliderInterval * ( colorBarIndex + 1 ) , 0.5 );
													colorIntervalVariable = lengthOfColorBar / ( numberOfColorsInTheRainbow - 1 );
													while ( coreVariable < 0 )
														coreVariable = coreVariable + colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) ;
													while ( coreVariable > colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) )
														coreVariable = coreVariable - colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) ;
													aColorBarHit = true;
													//someTargetColorHit = true;
												}
											for ( colorBarIndex = 0; colorBarIndex <= maxIndexOfVerticalColorBars; colorBarIndex++)
												if ( basispr.getArgb( x, y ) == blackGreenNumArray[colorBarIndex] )
												{
													colorBarDistance = 0;
													for ( colorBarCheck = y; colorBarCheck >= 0; colorBarCheck--)
													{
														if ( basispr.getArgb( x, colorBarCheck ) == blackGreenNumArray[colorBarIndex] )
															colorBarDistance++;
														else
															break;
													}
													coreVariable = colorBarDistance - Math.pow( xSlider / sliderInterval * ( colorBarIndex + 1 ) , 0.5 );
													colorIntervalVariable = lengthOfColorBar / ( numberOfColorsInTheRainbow - 1 );
													while ( coreVariable < 0 )
														coreVariable = coreVariable + colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) ;
													while ( coreVariable > colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) )
														coreVariable = coreVariable - colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) ;
													aColorBarHit = true;
													//someTargetColorHit = true;
												}
											for ( colorBarIndex = 0; colorBarIndex <= maxIndexOfVerticalColorBars; colorBarIndex++)
												if ( basispr.getArgb( x, y ) == blackPurpleNumArray[colorBarIndex] )
												{
													colorBarDistance = 0;
													for ( colorBarCheck = y; colorBarCheck <= Dim.height; colorBarCheck++)
													{
														if ( basispr.getArgb( x, colorBarCheck ) == blackPurpleNumArray[colorBarIndex] )
															colorBarDistance++;
														else
															break;
													}
													coreVariable = colorBarDistance - Math.pow( xSlider / sliderInterval * ( colorBarIndex + 1 ) , 0.5 );
													colorIntervalVariable = lengthOfColorBar / ( numberOfColorsInTheRainbow - 1 );
													while ( coreVariable < 0 )
														coreVariable = coreVariable + colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) ;
													while ( coreVariable > colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) )
														coreVariable = coreVariable - colorIntervalVariable * ( numberOfColorsInTheRainbow - 1 ) ;
													aColorBarHit = true;
													//someTargetColorHit = true;
												}
											if (aColorBarHit == false)
												if ( origionalpr.getArgb( x, y ) != magentaNum && origionalpr.getArgb( x, y ) != whiteNum && origionalpr.getArgb( x, y ) != transparentNum )
												{
													otherBrowserColorHit = true;
												}
												else
													if ( basispr.getArgb( x, y ) == oxylBlueNum )
													{
														coreVariable = ( ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) * radialDistance ) / 2 + xSlider ;
														if (coreVariable < 0)
															coreVariable = coreVariable + fullAngle;
														else
															if (coreVariable > fullAngle)
																coreVariable = coreVariable - fullAngle;
														colorIntervalVariable = fullAngle / ( numberOfColorsInTheRainbow - 1 );
													}
													else
														if ( basispr.getArgb( x, y ) == wheelDiamondsNum )
														{
															if ( ( y - HalfedDim.height ) < - HalfedDim.height / 10)
															{
																if ( ( x - HalfedDim.width ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) > - HalfedDim.height / 10) 
																	eightColorDiamondsIndex = 0;
																else
																	if ( ( x - HalfedDim.width ) + ( y - HalfedDim.height ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) + ( y - HalfedDim.height ) > - HalfedDim.height / 10 )
																		eightColorDiamondsIndex = 1;
																	else
																		if ( ( x - HalfedDim.width ) - ( y - HalfedDim.height ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) - ( y - HalfedDim.height ) > - HalfedDim.height / 10 )
																			eightColorDiamondsIndex = 7;
															}
															else
																if ( ( y - HalfedDim.height ) > HalfedDim.height / 10)
																{
																	if ( ( x - HalfedDim.width ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) > - HalfedDim.height / 10)
																		eightColorDiamondsIndex = 4;
																	else
																		if ( ( x - HalfedDim.width ) - ( y - HalfedDim.height ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) - ( y - HalfedDim.height ) > - HalfedDim.height / 10 )	
																			eightColorDiamondsIndex = 3;
																		else
																			if ( ( x - HalfedDim.width ) + ( y - HalfedDim.height ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) + ( y - HalfedDim.height ) > - HalfedDim.height / 10 )
																				eightColorDiamondsIndex = 5;
																}
																else
																	if ( x - HalfedDim.width > 0 )
																		eightColorDiamondsIndex = 2;
																	else
																		if ( x - HalfedDim.width < 0 )
																			eightColorDiamondsIndex = 6;
															eightColorDiamondsIndex = (int)Math.ceil( eightColorDiamondsIndex - 8 * xSlider / fullAngle );
															while ( eightColorDiamondsIndex < 0 )
																eightColorDiamondsIndex = eightColorDiamondsIndex + 8;
															while ( eightColorDiamondsIndex > 7 )
																eightColorDiamondsIndex = eightColorDiamondsIndex - 8;
															aWheelDiamondHit = true;
														}
															else
																if ( basispr.getArgb( x, y ) == wheelRodsNum )
																{
																	coreVariable = ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) * radialDistance ) + xSlider / 16 ;
																	while ( coreVariable < 0 )
																		coreVariable = coreVariable + fullAngle / 8;
																	while ( coreVariable > fullAngle / 8)
																		coreVariable = coreVariable - fullAngle / 8;
																	colorIntervalVariable = ( fullAngle / ( numberOfColorsInTheRainbow - 1 ) ) / 8;
																}
																else
																	if ( basispr.getArgb( x, y ) == wheelEndsNum )
																	{
																		coreVariable = ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) * radialDistance ) - xSlider / 16 ;
																		while ( coreVariable < 0 )
																			coreVariable = coreVariable + fullAngle / 8;
																		while ( coreVariable > fullAngle / 8)
																			coreVariable = coreVariable - fullAngle / 8;
																		colorIntervalVariable = ( fullAngle / ( numberOfColorsInTheRainbow - 1 ) ) / 8;
																	}
																	else // */
											if ( basispr.getArgb( x, y ) == neonGreenNum )
											{
												coreVariable = outerRingThickness - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - ( HalfedDim.height + 200) + 1, 2), 0.5) + outerRingThickness * xSlider / fullAngle;
												while ( coreVariable < outerRingThickness )//outerRingThickness )
													coreVariable = coreVariable + outerRingThickness;
												while ( coreVariable > outerRingThickness )
													coreVariable = coreVariable - outerRingThickness;
												colorIntervalVariable = outerRingThickness / ( numberOfColorsInTheRainbow - 1 ); //- 1 );
											}/*
																		else
																			if ( basispr.getArgb( x, y ) == wheelMiddleRingNum )
																			{
																				coreVariable = middleRingRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + 2 * middleRingThickness * xSlider / fullAngle ;
																				while ( coreVariable < middleRingThickness )
																					coreVariable = coreVariable + middleRingThickness;
																				while ( coreVariable > middleRingThickness )
																					coreVariable = coreVariable - middleRingThickness;
																				colorIntervalVariable = middleRingThickness / ( numberOfColorsInTheRainbow - 1 );
																			}
																			else
																				if ( basispr.getArgb( x, y ) == wheelInnerRingNum )
																				{
																					coreVariable = innerRingRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + 4 * innerRingThickness * xSlider / fullAngle ;
																					while ( coreVariable < innerRingThickness )
																						coreVariable = coreVariable + innerRingThickness;
																					while ( coreVariable > innerRingThickness )
																						coreVariable = coreVariable - innerRingThickness;
																					colorIntervalVariable = innerRingThickness / ( numberOfColorsInTheRainbow - 1 );
																				}
																				else
																					if ( basispr.getArgb( x, y ) == wheelTipsNum )
																						wheelTipsHit = true;
																					else
																						if ( Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y  - HalfedDim.height + 1, 2), 0.5) <= 47 )
																						{
																							radialVariableDistance = Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5);//Comment Out For  Ghetto Many Rainbow Clocks
																							angleVariable =  chrysanthemumRadius * ( ( - Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1) ) + Math.PI ) - 6 * Math.PI * xSlider / ( fullAngle / 10 ) );//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
																							radiusVariable = chrysanthemumRadius * ( radialVariableDistance * 24.6 + colorDisplacement + angleVariable);//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
																							while ( radiusVariable < colorDisplacement)//For Rainbow Ring
																								radiusVariable = radiusVariable + 2 * Math.PI * chrysanthemumRadius - colorDisplacement;//BAD COMMENT: For Rainbow Ring Take Out - 38
																							while ( radiusVariable > 2 * Math.PI * chrysanthemumRadius )
																								radiusVariable = radiusVariable - 2 * Math.PI * chrysanthemumRadius - colorDisplacement;
																							colorIntervalVariable = 2 * Math.PI * chrysanthemumRadius / ( numberOfColorsInTheRainbow - 1 );
																							coreVariable = radiusVariable;
																						}// */
											else //imperialFXcolors, imperialColorsNum
												if ( basispr.getArgb( x, y ) == greenNum )
												{
													if ( origionalpr.getArgb(x, y) != magentaNum )
														pattern2D.SimpleCustomColor((double)( Dim.width ), (double)(x), (double)(1), (int)( xSlider / sliderInterval ), /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing  ,*/ imperialColorsNum);
														//rainbowSoftColor.RainbowSoftColorRainbowFunction( (double)( Dim.width ), (double)(x) );
														//rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionAdjusted((double)( Dim.width ), (double)(x), (double)(1), (int)( xSlider / sliderInterval ), /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing  , imperialFXcolors, */ (double)(1), (double)(1) );
													//pattern2D.SimpleCustomColor( Dim.width, x, 1, (int)( xSlider / sliderInterval ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, imperialFXcolors );//(int)( (xSlider/sliderInterval) * 10 )^3
													else
														pattern2D.SimpleCustomColor((double)( Dim.width ), (double)(x), (double)(1), (int)( xSlider / sliderInterval ), /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing  ,*/ imperialColorsReverseNum);//imperialFXcolorsReverse);
														//rainbowSoftColor.RainbowSoftColorRainbowFunctionReverse( (double)( Dim.width ), (double)(x) );
														//rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionReverseAdjusted((double)( Dim.width ), (double)(x), (double)(1), (int)( xSlider / sliderInterval ), /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing  , imperialFXcolorsReverse, */ (double)(1), (double)(1) );
													//pattern2D.SimpleCustomColor( Dim.width, x, 1, (int)( xSlider / sliderInterval ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, imperialFXcolorsReverse );
													//color = pattern2D.color;
													someTargetColorHit = false;
													//rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunction((double)( Dim.width ), (double)(x), (double)(1), (int)( xSlider / sliderInterval ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, (double)(1), (double)(1) );
													//transparencySlider.TransparencySliderFunction( (double)( Dim.width ), (double)(x), (double)(1), (int)( xSlider / sliderInterval ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(pattern2D.ToFXColor()), new TransparencySlider(pattern2D.ToFXColor()), (double)(1), (double)(0) );
													pw.setColor( x, y, pattern2D.ToFXColor() );//rainbowSoftColor.ToFXColor() );
													//System.out.println("x: " + x + " y: " + y + " pr: "+ origionalpr.getColor( x, y ) + " cv: " + coreVariable + " civ: " + colorIntervalVariable );
												}
												else
													someTargetColorHit = false;
											/*if ( Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y  - HalfedDim.height + 1 + chrysanthemumYDisplacement, 2), 0.5) <= 64 )
													{//902 //1019
														someTargetColorInTheCenterHit = true;
														if ( basispr.getArgb( x, y ) == black6Num )
														{
															coreVariable = chrysanthemumRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1 + chrysanthemumYDisplacement, 2), 0.5) + 6 * 0.175979734764 * chrysanthemumRadius * xSlider / ( fullAngle / 10 ) ;
															while ( coreVariable < 0.175979734764 * chrysanthemumRadius)
																coreVariable = coreVariable + 0.175979734764 * chrysanthemumRadius;
															while ( coreVariable > 0.175979734764 * chrysanthemumRadius)
																coreVariable = coreVariable - 0.175979734764 * chrysanthemumRadius;
															colorIntervalVariable = 0.175979734764 * chrysanthemumRadius / ( numberOfColorsInTheRainbow - 1 );
														}
														else
															if ( basispr.getArgb( x, y ) == white1Num )
															{
																radialVariableDistance = Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1 + chrysanthemumYDisplacement, 2), 0.5);//Comment Out For  Ghetto Many Rainbow Clocks
																angleVariable =  chrysanthemumRadius * ( ( - Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 + chrysanthemumYDisplacement) ) + Math.PI ) - 6 * Math.PI * xSlider / ( fullAngle / 10 ) );//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
																radiusVariable = chrysanthemumRadius * ( radialVariableDistance * 24.6 + colorDisplacement + angleVariable);//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
																while ( radiusVariable < colorDisplacement)//For Rainbow Ring
																	radiusVariable = radiusVariable + 2 * Math.PI * chrysanthemumRadius - colorDisplacement;//BAD COMMENT: For Rainbow Ring Take Out - 38
																while ( radiusVariable > 2 * Math.PI * chrysanthemumRadius )
																	radiusVariable = radiusVariable - 2 * Math.PI * chrysanthemumRadius - colorDisplacement;
																colorIntervalVariable = 2 * Math.PI * chrysanthemumRadius / ( numberOfColorsInTheRainbow - 1 );
																coreVariable = radiusVariable;
															}
															else
																if ( basispr.getArgb( x, y ) == white2Num )
																{
																	coreVariable = x - 902 - chrysanthemumRadius * 2 * xSlider / ( fullAngle / 10 );
																	while (coreVariable < 0)
																		coreVariable = coreVariable + chrysanthemumRadius * 2;
																	while (coreVariable > chrysanthemumRadius * 2)
																		coreVariable = coreVariable - chrysanthemumRadius * 2;
																	colorIntervalVariable = chrysanthemumRadius * 2 / (numberOfColorsInTheRainbow - 1 );
																}
																else
																	if ( basispr.getArgb( x, y ) == white3Num )
																	{
																		angleVariable = - chrysanthemumRadius *  2 * Math.PI * ( ( Math.atan2( (x - HalfedDim.width + 1) , ( y - HalfedDim.height + 1 + chrysanthemumYDisplacement ) ) + Math.PI ) + xSlider / ( ( chrysanthemumNumberOfPedals - 1 ) * fullAngle / 10 ) ) ;
																		while (angleVariable < 0)
																			angleVariable = angleVariable + chrysanthemumRadius / ( chrysanthemumNumberOfPedals - 1);
																		while (angleVariable > chrysanthemumRadius / (chrysanthemumNumberOfPedals - 1) )
																			angleVariable = angleVariable - chrysanthemumRadius / ( chrysanthemumNumberOfPedals - 1);
																		coreVariable = angleVariable;
																		colorIntervalVariable = chrysanthemumRadius / ( ( numberOfClockHandsForRainbow - 1 ) * ( chrysanthemumNumberOfPedals - 1) );
																	}
																	else
																		if ( basispr.getArgb( x, y ) == white4Num )
																		{
																			radialVariableDistance = Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1 + chrysanthemumYDisplacement, 2), 0.5);//Comment Out For  Ghetto Many Rainbow Clocks
																			angleVariable = ( ( - Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 + chrysanthemumYDisplacement) ) + Math.PI ) - 6 * Math.PI * xSlider / ( fullAngle / 10 ) ) * 10 * chrysanthemumRadius;//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
																			radiusVariable = ( radialVariableDistance * 24.6 + colorDisplacement + angleVariable ) / ( 2 * chrysanthemumRadius);//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
																			while ( radiusVariable < colorDisplacement)//For Rainbow Ring
																				radiusVariable = radiusVariable + 2 * chrysanthemumRadius * Math.PI - colorDisplacement;//BAD COMMENT: For Rainbow Ring Take Out - 38
																			while ( radiusVariable > 2 * chrysanthemumRadius * Math.PI )
																				radiusVariable = 2 * chrysanthemumRadius * Math.PI - colorDisplacement;
																			colorIntervalVariable = 2 * chrysanthemumRadius * Math.PI / ( numberOfColorsInTheRainbow - 1 );
																			coreVariable = radiusVariable;// / ( Dim.height / 64);
																		}
																		else
																			if ( basispr.getArgb( x, y ) == simpleBlueNum )
																			{//951 To 969
																				coreVariable = chrysanthemumInnerRadius - Math.pow(Math.pow(x - HalfedDim.width, 2) + Math.pow( y - HalfedDim.height + chrysanthemumYDisplacement, 2), 0.5) + 88 * chrysanthemumInnerRadius * xSlider / ( fullAngle / 10 ) ;
																				while ( coreVariable < chrysanthemumInnerRadius)
																					coreVariable = coreVariable + chrysanthemumInnerRadius;
																				while ( coreVariable > chrysanthemumInnerRadius)
																					coreVariable = coreVariable - chrysanthemumInnerRadius;
																				colorIntervalVariable = chrysanthemumInnerRadius / ( numberOfColorsInTheRainbow - 1 );
																			}
																			else
																				someTargetColorInTheCenterHit = false;
													}
											if (aColorBarHit == false)
												if ( someTargetColorInTheCenterHit == false )
													if ( basispr.getArgb( x, y ) == oxylBlueNum)
													{
														//makePixelTransparent = true;//Comment This Line Out For Rainbow Strobe Effect
														angleVariable = Math.atan2( (x - HalfedDim.width + 1) , (y - Dim.height * 4 / 3 + 1 ) );// For Rising Sun + 1
														aVariable = ( angleVariable * /*Math.cos( angle ) * Math.sin( angle ) * Math.pow(radialVariableDistance, 1)/ Math.tan( angleVariable ) /*+ Math.PI|STAR|/ )  * radialDistance / 4.46783504 + xSlider;// + Or - xSlider Determines Which Direction It Moves //For Infinite Number Theorem Good a = ( angle * /*Math.cos( angle ) * Math.sin( angle ) * Math.pow(radialVariableDistance, 1)|STAR|/ Math.tan( angle ) + Math.PI )  * radialDistance / 4.46783504 - xSlider;  //a = ( angle /*Math.cos( angle ) * Math.sin( angle ) * Math.pow(radialVariableDistance, 1)|STAR|/ Math.tan( angle ) + Math.PI )  * radialDistance / 4.46783504 - xSlider;//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals //Use This: "a = ( - angle + Math.PI ) * radialDistance;" Line For Rainbow Clock //a = ( - angle * Math.tan( angle ) + Math.PI ) * radialDistance - xSlider; For Infinite Number Theorem //a = ( - angle * Math.cos( angle ) * Math.sin( angle ) * Math.pow(radialVariableDistance, 2) + Math.PI ) * radialDistance - xSlider; |STAR|/
														radiusVariable = aVariable * 10;
														// |STAR|///For Old Infinite Number Theorem Use Above
														//radius = a * 10;//For Rainbow Spiral And Clock
														//}
														while ( radiusVariable < colorDisplacementVariable)//For Rainbow Ring
															radiusVariable = radiusVariable + fullAngle - colorDisplacementVariable;//BAD COMMENT: For Rainbow Ring Take Out - 38
														while ( radiusVariable > fullAngle )//radius > fullAngle For Non Infinite Number Theorem
															radiusVariable = radiusVariable - fullAngle - colorDisplacementVariable; //radius = radius - fullAngle; For Non Infinite Number Theorem //For Rainbow Clock Comment Out To Here. Here -- |STAR|/
														colorIntervalVariable = colorIntervalForWholeScreen;
														coreVariable = radiusVariable;
													}
													else
														if ( basispr.getArgb( x, y ) == skyBlueNum)
														{
															radialVariableDistance = Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5);//Comment Out For  Ghetto Many Rainbow Clocks
															angleVariable = ( ( - Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) - 6 * Math.PI * xSlider / ( fullAngle / 10 ) ) * radialDistance;//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
															radiusVariable = radialVariableDistance * 24.6 + colorDisplacement + angleVariable;//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
															while ( radiusVariable < colorDisplacement)//For Rainbow Ring
																radiusVariable = radiusVariable + fullAngle - colorDisplacement;//BAD COMMENT: For Rainbow Ring Take Out - 38
															while ( radiusVariable > fullAngle )
																radiusVariable = radiusVariable - fullAngle - colorDisplacement;
															colorIntervalVariable = fullAngle / ( numberOfColorsInTheRainbow - 1 );
															coreVariable = radiusVariable;						
														}
														else
															if ( basispr.getArgb( x, y ) == magentaNum)
															{
																coreVariable = HalfedDim.height - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + 6 * 0.175979734764 * xSlider * HalfedDim.height / ( fullAngle / 10 ) ;
																while ( coreVariable < 0.175979734764 * HalfedDim.height)
																	coreVariable = coreVariable + 0.175979734764 * HalfedDim.height;
																while ( coreVariable > 0.175979734764 * HalfedDim.height)
																	coreVariable = coreVariable - 0.175979734764 * HalfedDim.height;
																colorIntervalVariable = 0.175979734764 * HalfedDim.height / ( numberOfColorsInTheRainbow - 1 );
															}
															else
																if ( basispr.getArgb( x, y ) == neonGreenNum )
																{
																	angleVariable = radialDistance * ( ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) + 2 * Math.PI * xSlider / ( fullAngle / 10 ) );
																	while (angleVariable < 0)
																		angleVariable = angleVariable + fullAngle * 2;
																	while (angleVariable > fullAngle * 2)
																		angleVariable = angleVariable - fullAngle * 2;
																	coreVariable = angleVariable;
																	colorIntervalVariable = ( 2 * fullAngle ) / ( numberOfClockHandsForRainbow - 1 );
																	//angle = 0;//Testing Purposes Only.
																}
																else
																	if ( basispr.getArgb( x, y ) == halfGreyNum )
																	{
																		angleVariable = - radialDistance * ( ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) - 2 * Math.PI * xSlider / ( fullAngle / 10 ) );
																		while (angleVariable < 0)
																			angleVariable = angleVariable + fullAngle * 2;
																		while (angleVariable > fullAngle * 2)
																			angleVariable = angleVariable - fullAngle * 2;
																		coreVariable = angleVariable;
																		colorIntervalVariable = ( 2 * fullAngle ) / ( numberOfClockHandsForRainbow - 1 );
																		//angle = 0;//Testing Purposes Only.
																	}
																	else
																		if ( basispr.getArgb( x, y ) == maroonNum )//neonGreenNum)
																		{
																			angleVariable = - radialDistance * ( ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) + 2 * Math.PI * xSlider / ( (numberOfClockHandsForOrderOfMagi - 1) * fullAngle / 10 ) );
																			while (angleVariable < 0)
																				angleVariable = angleVariable + fullAngle * 2 / ( numberOfClockHandsForOrderOfMagi - 1);
																			while (angleVariable > fullAngle * 2 / ( numberOfClockHandsForOrderOfMagi - 1) )
																				angleVariable = angleVariable - fullAngle * 2 / ( numberOfClockHandsForOrderOfMagi - 1);
																			coreVariable = angleVariable;
																			colorIntervalVariable = ( 2 * fullAngle ) / ( ( numberOfColorsForOrderOfMagi - 1 ) * ( numberOfClockHandsForOrderOfMagi - 1) );
																			//angle = 0;//Testing Purposes Only.
																			if ( origionalpr.getArgb( x, y ) == magentaNum )//shitBrownNum )//origionalpr.getArgb(x, y) == magentaNum )// == magecoreVariable// == webBlackNum
																				if ( coreVariable < colorIntervalVariable  + colorDisplacement)//For Normal Rainbow Use This Instead Of The Others
																					color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorDisplacement, blue, green);
																				else
																					color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorIntervalVariable - colorDisplacement, green, blue);
																			else//|STAR|/
																				if ( coreVariable < colorIntervalVariable  + colorDisplacement)//For Normal Rainbow Use This Instead Of The Others
																					color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorDisplacement, green, blue);
																				else
																					color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorIntervalVariable - colorDisplacement, blue, green);//*
																			pw.setArgb( x, y, (int)(255 * 16777216 + (int)color.RGB[0] * 65536 + (int)color.RGB[1] * 256 + (int)color.RGB[2]));//setArgb
																			greenBlueGreenUsed = true;
																		}
																		else
																			if ( basispr.getArgb( x, y ) == pinkNum )
																			{//304 + 244 = 548 // 656 //Need Correction For Screen Size !!
																				coreVariable = x - 656 - 628 * xSlider / ( fullAngle / 10 );
																				while (coreVariable < 0)
																					coreVariable = coreVariable + 628;
																				while (coreVariable > 628)
																					coreVariable = coreVariable - 628;
																				colorIntervalVariable =  628 / (numberOfColorsInTheRainbow - 1 );
																			}
																			else
																				someTargetColorHit = false;//*/




											//End Of Basis Image Switch System
											if ( origionalpr.getArgb( x, y ) == oxylBlue0FFNum)
												/*if ( basispr.getArgb( x, y ) != neonGreenNum && neonGreenCheck.ColorTooSimilarFunction( oxylBlue0FFNum, basispr.getArgb( x, y ) ) )//origionalpr.getArgb( x, y ) , 
													pw.setArgb( x, y, neonGreenNum);//shitBrownNum);//pr.getArgb( x, y ) );
												else//*/
												pw.setArgb( x, y, oxylBlue0FFNum);
											else/*
												if (otherBrowserColorHit == true)
													pw.setArgb( x, y, origionalpr.getArgb( x, y ) );
												else
													if (makePixelTransparent == true)
														pw.setArgb( x, y, transparentNum );
													else
														if ( greenBlueGreenUsed == false )// */
												/*if ( aWheelDiamondHit == true)
													if ( origionalpr.getArgb( x, y ) == magentaNum )//shitBrownNum )
														pw.setArgb( x, y, magentaNum );
													else
														pw.setArgb( x, y, wheelDiamondsArrayNum[eightColorDiamondsIndex] );
												else
													if ( wheelTipsHit == true)
														if (xSlider <= fullAngle - 8.468 * sliderInterval )
															pw.setArgb( x, y, greenNum );
														else
															pw.setArgb( x, y, redNum );
													else// */
												if ( someTargetColorHit == true)//numberOfClockHandsForOrderOfMagi  //greenBlueGreenUsed
												{
													//System.out.println("x: " + x + " y: " + y + " pr: "+ origionalpr.getColor( x, y ) + " cv: " + coreVariable + " civ: " + colorIntervalVariable );
													//	if ( coreVariable >= colorDisplacementVariable && coreVariable < (numberOfColorsInTheRainbow - 1) * colorIntervalVariable  + colorDisplacement)//For Purple Outside Ring
													//{//Retain Below If Else And Use New Variable Names And Equate Them With If Switch Below New Variable Name Comment Above // Make html Text Flip shitBrownNum Color!
													if ( origionalpr.getArgb( x, y ) == magentaNum )//shitBrownNum )//origionalpr.getArgb(x, y) == magentaNum )// == magecoreVariable// == webBlackNum
														color.RainbowSoftColorRainbowFunctionReverseAdjusted(colorIntervalVariable, coreVariable, 1, 2);//Highest int = 2,147,483,647
													else
														color.RainbowSoftColorRainbowFunctionAdjusted(colorIntervalVariable, coreVariable, 1, 0);
													//color.RainbowSoftColorRainbowFunction(colorIntervalVariable, colorIntervalVariable * 6 - coreVariable);
													/*if ( coreVariable < colorIntervalVariable  + colorDisplacement)//For Normal Rainbow Use This Instead Of The Others
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorDisplacement, purple, blue);
														else if ( coreVariable < ( 2 * colorIntervalVariable  + colorDisplacement) )
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorIntervalVariable - colorDisplacement, blue, teal);
														else if ( coreVariable < ( 3 * colorIntervalVariable  + colorDisplacement) )		
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - 2 * colorIntervalVariable - colorDisplacement, teal, pink);
														else if ( coreVariable < ( 4 * colorIntervalVariable  + colorDisplacement) )
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - 3 * colorIntervalVariable - colorDisplacement, pink, yellow);
														else if ( coreVariable < ( 5 * colorIntervalVariable  + colorDisplacement) )
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - 4 * colorIntervalVariable - colorDisplacement, yellow, orange);
														else
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - 5 * colorIntervalVariable - colorDisplacement, orange, red);
													else
														if ( coreVariable < colorIntervalVariable  + colorDisplacement)//For Normal Rainbow Use This Instead Of The Others
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorDisplacement, red, orange);
														else if ( coreVariable < ( 2 * colorIntervalVariable  + colorDisplacement) )
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorIntervalVariable - colorDisplacement, orange, yellow);
														else if ( coreVariable < ( 3 * colorIntervalVariable  + colorDisplacement) )		
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - 2 * colorIntervalVariable - colorDisplacement, yellow, green);
														else if ( coreVariable < ( 4 * colorIntervalVariable  + colorDisplacement) )
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - 3 * colorIntervalVariable - colorDisplacement, green, teal);
														else if ( coreVariable < ( 5 * colorIntervalVariable  + colorDisplacement) )
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - 4 * colorIntervalVariable - colorDisplacement, teal, blue);
														else
															color.ColorSliderFunction(colorIntervalVariable, coreVariable - 5 * colorIntervalVariable - colorDisplacement, blue, purple);// */
													//System.out.println("x: " + x + " y: " + y + " (int)color.RGB[1]: " + (int)color.RGB[1]);
													//tempFXColor = color.ToFXColor().invert();
													//tempFXColor = tempFXColor.rgb((int)color.RGB[0] , Math.abs( (int)color.RGB[1] ), (int)color.RGB[2]).invert();//Temporary Fix Mat.abs On This Line
													//color.RGB = new double[] { ( tempFXColor.getRed() + 1/256 ) * 256 - 1 , ( tempFXColor.getGreen() + 1/256 ) * 256 - 1, (tempFXColor.getBlue() + 1/256 ) * 256 - 1 };
													//pw.setArgb( x, y, (int)(255 * 16777216 + (int)color.RGB[0] * 65536 + (int)color.RGB[1] * 256 + (int)color.RGB[2]));
													pw.setColor(x, y, color.ToFXColor());//.invert());
												}
												else
													if ( origionalpr.getArgb( x, y ) != magentaNum && basispr.getArgb( x, y ) != greenNum )//shitBrownNum )
														pw.setArgb( x, y, basispr.getArgb( x, y ) );
											/*else
																	if ( origionalpr.getArgb( x, y ) == oxylBlue0FFNum)
																		if ( basispr.getArgb( x, y ) != neonGreenNum && neonGreenCheck.ColorTooSimilarFunction( oxylBlue0FFNum, basispr.getArgb( x, y ) ) )//origionalpr.getArgb( x, y ) , 
																			pw.setArgb( x, y, neonGreenNum);//shitBrownNum);//pr.getArgb( x, y ) );
																		else
																			pw.setArgb( x, y, oxylBlue0FFNum);//*/
											/*else
																//System.out.println( neonGreenCheck.ColorTooSimilarFunction( origionalpr.getArgb( x, y ), basispr.getArgb( x, y ) ) );
																if ( neonGreenCheck.ColorTooSimilarFunction( neonGreenNum, basispr.getArgb( x, y ) ) )//origionalpr.getArgb( x, y ) , 
																	pw.setArgb( x, y, skyBlueNum);//shitBrownNum);//pr.getArgb( x, y ) );
																else
																	pw.setArgb( x, y, neonGreenNum);// */
											
											//diagnostics.ColorTooSimilar( x, y, xSlider * secondScreen.getBounds().getWidth() / fullAngle );
											//diagnostics.ColorSlider( x, y, xSlider * secondScreen.getBounds().getWidth() / fullAngle, xSlider / fullAngle, (int)( xSlider / sliderInterval ) );
											//diagnostics.TransparencySlider( x, y, xSlider * secondScreen.getBounds().getWidth() / fullAngle, xSlider / fullAngle, (int)( xSlider / sliderInterval ), 0, 1 );
											diagnostics.RainbowSoftColor( x, y, xSlider * secondScreen.getBounds().getWidth() / fullAngle, xSlider / fullAngle, (int)( xSlider / sliderInterval ), imperialFXcolors, imperialColorsNum, 0, 1 );
											pw.setColor( x, y, diagnostics.ToFXColor() );
										}
									}
									imageView.setImage(writableImage);

									secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle) + 1] = new StackPane();
									System.out.println("(int)(secondFRateDivisor * xSlider/fullAngle) + 1 = " + (int)(secondFRateDivisor * xSlider/fullAngle) + 1);
									//secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle) + 1].getChildren().add(browser);
									//secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle) + 1].getChildren().remove(0);
									secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle) + 1].getChildren().add(imageView);
									//End Of xSlider Loop For .3db Video Production .3da Should Be For Abstract 3-D Video Compression .3dc Should For Degraded 3-D Video Compression .3dm Should Be For Standard 3D Videos
									//.3dv Should Be For 3-D Virtual Environment Integration And Interoperability With 2-D Pictures And Video And Interactive Audio Management.
									secondScene[(int)(secondFRateDivisor * xSlider/fullAngle) + 1] = new Scene(secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle) + 1]);//Each A 3D Image
									secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle) + 1].getScene().snapshot(bufferPicture);
									currentBrowserImage = secondStackPane[(int)(secondFRateDivisor * xSlider/fullAngle) + 1].getScene().snapshot(bufferPicture);// !!!!! Uncomment To Show Video !!!!!
									//secondaryStage.setFullScreen(secondaryIsFullScreened);
									//secondaryStage.show();// !!!!! Uncomment To Show Video !!!!!

									secondaryStage.setScene(secondScene[(int)(secondFRateDivisor * xSlider/fullAngle) + 1]);

									System.out.println(Dim);

									//secondaryStage.setFullScreen(secondaryIsFullScreened);// ASDF !!!! HERE ! Important For Full Screened
									secondaryStage.show(); // !!!!! Uncomment To Show Video !!!!!
									//secondaryStage.setFullScreen(secondaryIsFullScreened);// Important For Full Screened
									bImage = SwingFXUtils.fromFXImage(secondScene[(int)(secondFRateDivisor * xSlider/fullAngle) + 1].snapshot( writableImage ), bImage );

									if ( xSlider < 1 && xSlider > -1 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
									{
										try {
											File outputFile = new File("C:/TestImage00.png");
											ImageIO.write(bImage, "png", outputFile);
										} catch (IOException e) {
											throw new RuntimeException(e);
										}
									}
									else
										if ( xSlider > 142 && xSlider <= 143 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
										{
											try {
												File outputFile = new File("C:/TestImage01.png");
												ImageIO.write(bImage, "png", outputFile);
											} catch (IOException e) {
												throw new RuntimeException(e);
											}
										}
										else
											if ( xSlider > 285 && xSlider <= 286 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
											{
												try {
													File outputFile = new File("C:/TestImage02.png");
													ImageIO.write(bImage, "png", outputFile);
												} catch (IOException e) {
													throw new RuntimeException(e);
												}
											}
											else
												if ( xSlider > 489 && xSlider <= 490 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
												{//428 && xSlider <= 429
													try {
														File outputFile = new File("C:/TestImage03.png");
														ImageIO.write(bImage, "png", outputFile);
													} catch (IOException e) {
														throw new RuntimeException(e);
													}
												}
												else
													if ( xSlider > 571 && xSlider <= 572 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
													{
														try {
															File outputFile = new File("C:/TestImage04.png");
															ImageIO.write(bImage, "png", outputFile);
														} catch (IOException e) {
															throw new RuntimeException(e);
														}
													}
													else
														if ( xSlider > 714 && xSlider <= 715 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
														{
															try {
																File outputFile = new File("C:/TestImage05.png");
																ImageIO.write(bImage, "png", outputFile);
															} catch (IOException e) {
																throw new RuntimeException(e);
															}
														}
														else
															if ( xSlider > 857 && xSlider <= 858 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
															{
																try {
																	File outputFile = new File("C:/TestImage06.png");
																	ImageIO.write(bImage, "png", outputFile);
																} catch (IOException e) {
																	throw new RuntimeException(e);
																}
															}
															else
																if ( xSlider > 1000 && xSlider <= 1001 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																{
																	try {
																		File outputFile = new File("C:/TestImage07.png");
																		ImageIO.write(bImage, "png", outputFile);
																	} catch (IOException e) {
																		throw new RuntimeException(e);
																	}
																}
																else
																	if ( xSlider > 1143 && xSlider <= 1144 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																	{
																		try {
																			File outputFile = new File("C:/TestImage08.png");
																			ImageIO.write(bImage, "png", outputFile);
																		} catch (IOException e) {
																			throw new RuntimeException(e);
																		}
																	}
																	else
																		if ( xSlider > 1286 && xSlider <= 1287 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																		{
																			try {
																				File outputFile = new File("C:/TestImage09.png");
																				ImageIO.write(bImage, "png", outputFile);
																			} catch (IOException e) {
																				throw new RuntimeException(e);
																			}
																		}
																		else
																			if ( xSlider > 1429 && xSlider <= 1430 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																			{
																				try {
																					File outputFile = new File("C:/TestImage10.png");
																					ImageIO.write(bImage, "png", outputFile);
																				} catch (IOException e) {
																					throw new RuntimeException(e);
																				}
																			}
																			else
																				if ( xSlider > 1572 && xSlider <= 1573 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																				{
																					try {
																						File outputFile = new File("C:/TestImage11.png");
																						ImageIO.write(bImage, "png", outputFile);
																					} catch (IOException e) {
																						throw new RuntimeException(e);
																					}
																				}
																				else
																					if ( xSlider > 1714 && xSlider <= 1715 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																					{
																						try {
																							File outputFile = new File("C:/TestImage12.png");
																							ImageIO.write(bImage, "png", outputFile);
																						} catch (IOException e) {
																							throw new RuntimeException(e);
																						}
																					}
																					else
																						if ( xSlider > 1857 && xSlider <= 1858 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																						{
																							try {
																								File outputFile = new File("C:/TestImage13.png");
																								ImageIO.write(bImage, "png", outputFile);
																							} catch (IOException e) {
																								throw new RuntimeException(e);
																							}
																						}
																						else
																							if ( xSlider > 2000 && xSlider <= 2001 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																							{
																								try {
																									File outputFile = new File("C:/TestImage14.png");
																									ImageIO.write(bImage, "png", outputFile);
																								} catch (IOException e) {
																									throw new RuntimeException(e);
																								}
																							}
																							else
																								if ( xSlider > 2143 && xSlider <= 2144 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																								{
																									try {
																										File outputFile = new File("C:/TestImage15.png");
																										ImageIO.write(bImage, "png", outputFile);
																									} catch (IOException e) {
																										throw new RuntimeException(e);
																									}
																								}
																								else
																									if ( xSlider > 2286 && xSlider <= 2287 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																									{
																										try {
																											File outputFile = new File("C:/TestImage16.png");
																											ImageIO.write(bImage, "png", outputFile);
																										} catch (IOException e) {
																											throw new RuntimeException(e);
																										}
																									}
																									else
																										if ( xSlider > 2429 && xSlider <= 2430 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																										{
																											try {
																												File outputFile = new File("C:/TestImage17.png");
																												ImageIO.write(bImage, "png", outputFile);
																											} catch (IOException e) {
																												throw new RuntimeException(e);
																											}
																										}
																										else
																											if ( xSlider > 2572 && xSlider <= 2573 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																											{
																												try {
																													File outputFile = new File("C:/TestImage18.png");
																													ImageIO.write(bImage, "png", outputFile);
																												} catch (IOException e) {
																													throw new RuntimeException(e);
																												}
																											}
																											else
																												if ( xSlider > 2715 && xSlider <= 2716 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																												{
																													try {
																														File outputFile = new File("C:/TestImage19.png");
																														ImageIO.write(bImage, "png", outputFile);
																													} catch (IOException e) {
																														throw new RuntimeException(e);
																													}
																												}
																												else
																													if ( xSlider > 2858 && xSlider <= 2859 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																													{
																														try {
																															File outputFile = new File("C:/TestImage20.png");
																															ImageIO.write(bImage, "png", outputFile);
																														} catch (IOException e) {
																															throw new RuntimeException(e);
																														}
																													}
																													else
																														if ( xSlider > 3001 && xSlider <= 3002 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																														{
																															try {
																																File outputFile = new File("C:/TestImage21.png");
																																ImageIO.write(bImage, "png", outputFile);
																															} catch (IOException e) {
																																throw new RuntimeException(e);
																															}
																														}
																														else
																															if ( xSlider > 3144 && xSlider <= 3145 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																															{
																																try {
																																	File outputFile = new File("C:/TestImage22.png");
																																	ImageIO.write(bImage, "png", outputFile);
																																} catch (IOException e) {
																																	throw new RuntimeException(e);
																																}
																															}
																															else
																																if ( xSlider > 3287 && xSlider <= 3288 )//(int)Math.round(colorDisplacement) + radialDistance * 2 * Math.PI / numberOfClockHandsForRainbow / 2)
																																{
																																	try {
																																		File outputFile = new File("C:/TestImage23.png");
																																		ImageIO.write(bImage, "png", outputFile);
																																	} catch (IOException e) {
																																		throw new RuntimeException(e);
																																	}
																																}// */

									// Generate the image, for Android use Bitmap
									//BufferedImage bImage = SwingFXUtils.fromFXImage(secondScene[(int)(secondFRateDivisor * xSlider/fullAngle) + 1].snapshot(null), null);
									// Encode the image OLD: try {
									try {
										System.out.println( "bImage Height: " + bImage.getHeight() );
										encoder.encodeImage( bImage );
										//encoder.encodeImage( bImage.getSubimage( 0, 0, 666, 888 ) );
									}
									catch(IOException ie) { ie.printStackTrace(); }
									System.out.println("Finished Encoding Frame: " + (int)(secondFRateDivisor * xSlider/fullAngle) + 1);

									/*try {
									secondEnc.encodeImage( SwingFXUtils.fromFXImage(secondScene[(int)(secondFRateDivisor * xSlider/fullAngle) + 1].snapshot(null), null ) ); }
								catch(IOException ie) { ie.printStackTrace(); }//*/

									//enc.encodeImage( SwingFXUtils.fromFXImage( imageView.getImage(), null ) );

									//Save JavaScript With JavaScript Scroll Changes
									/*try ( PrintWriter out = new PrintWriter(secondJavaScriptFile.getPath() ) )
								{
									out.println("Is Writing");
									out.close();
								}
								catch(IOException ie) { ie.printStackTrace(); }// */

									if ( xSlider != 0 && xSlider / ( sliderInterval * numberOfScrollFrames ) - Math.floor( xSlider / ( sliderInterval * numberOfScrollFrames ) ) < .0001)//interval * 11->Twice + (int)(xSlider / ( interval * 11 )) + " );\r\n" + 
									{
										try ( PrintWriter printWriterOut = new PrintWriter(secondXSliderFile.getPath() ) )
										{
											printWriterOut.println("+" + xSlider + "d");
											printWriterOut.close();
										}
										catch(IOException ie) { ie.printStackTrace(); }// */
										try ( PrintWriter printWriterOut = new PrintWriter(secondJavaScriptFile.getPath() ) )
										{
											printWriterOut.println("function scrollContinuously( timeInterval )\r\n" + 
													"{\r\n" + 
													"	timeInterval = 444;\r\n" + 
													"	window.setInterval( scrollWin, timeInterval );\r\n" + 
													"}\r\n" + 
													"function scrollWin()\r\n" + 
													"{\r\n" + 
													"    window.scrollBy( 0, 100 )\\r\\n" +
													"}");
											printWriterOut.close();
										}
										catch(IOException ie) { ie.printStackTrace(); }// */
										scrollHappened = true;
									}
									if (scrollHappened)
									{
										scrollHappened = false;
										//secondBrowserEngine.executeScript(script);
										secondBrowserEngine.load( "http://www.pixies.zone/PixiesTest%20-%20Copy%20(3).html" );
										secondBrowserEngine.reload();
										return;
									}//System.out.println(secondJavaScriptFile.toString());
									//secondBrowser.getEngine().load("file:///C:/Users/AllAV/Desktop/FWA%20Website/pixies.zone/PixiesTest%20-%20Copy%20(2).html");

									//fullScreened = secondaryStage.isFullScreen();

									/*secondScene[(int)(secondFRateDivisor * xSlider/fullAngle) + 1].setOnKeyReleased(new EventHandler<KeyEvent>()
								{
									@Override
									public void handle(KeyEvent event)
									{
										if ( event.isAltDown() == true)
										{
											switch (event.getCode())
											{
											case ENTER: secondaryStage.setFullScreen(!secondaryStage.isFullScreen()); break;
											}
										}
									}
								});// */
									System.out.println("xSlider: " + xSlider);
									xSlider = xSlider + sliderInterval;
									//System.out.println(Dim);

									//}
									//Thread.sleep(2000);}
									//catch (Exception ex) {ex.printStackTrace();}
								}
								System.out.println("Main Program Loop Over");
								// Finalize the encoding, i.e. clear the buffers, write the header, etc.
								try {
									encoder.finish();
								}
								catch(IOException ie) { ie.printStackTrace(); }
							}
							catch(IOException ie) { ie.printStackTrace(); }
							finally {
								NIOUtils.closeQuietly(videoOut);
							}
							System.exit(0);
							//return;
						}
						//return;
					}
				}
				);

		/*synchronized ( secondaryThread )
						{

							System.out.println("Before Wait");
							secondaryThread.wait(10000);
							System.out.println("Past Wait");
						}//secondaryThread.wait(1000);
			} catch (InterruptedException ex) {
				System.err.println("An InterruptedException was caught: " + ex.getMessage());
				ex.printStackTrace();
			}*/
		//secondaryStage.show();
		//origionalBrowserImage = secondBrowser.snapshot(sP, nextTextPicture);
		//Image origionalBrowserImage = secondBrowser.snapshot(sP, nextTextPicture);
		//nextTextPicture = secondBrowser.snapshot(sP, nextTextPicture);
		//Image origionalBrowserImage = secondScene[0].snapshot(nextTextPicture);
		/*origionalBrowserImage = secondScene[0].snapshot(nextTextPicture);
		origionalBrowserImage = secondStackPane[0].getScene().snapshot(bufferPicure);
		secondaryStage.setScene(secondScene[0]);
		secondaryStage.setFullScreen(true);
		try { secondaryThread.sleep(4000);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}
		secondaryStage.show();// */
		/*secondScene[(int)(secondFRateDivisor * xSlider/fullAngle)].setOnKeyReleased(new EventHandler<KeyEvent>()
		{
			@Override
			public void handle(KeyEvent event)
			{
				if ( event.isAltDown() == true)
				{
					switch (event.getCode())
					{
					case ENTER: secondaryStage.setFullScreen(!secondaryStage.isFullScreen()); break;
					}
				}
			}
		});//*/

		//VBox root = new VBox();
		//root.getChildren().addAll(addressBar, goButton, stateLabel, progressBar, browser);
		//secondScene[0] = new Scene(secondStackPane[0]);
		//secondaryStage.setScene(secondScene[0]);



		//secondaryStage.setFullScreen(true);
		//secondaryStage.show();

		//WritableImage nextTextPicture = new WritableImage( Dim.width, Dim.height );
		//Image origionalBrowserImage = new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Pixies%20Text.png");//browser.snapshot(sP, nextTextPicture);//new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Pixies%20Text.png");//
		//Image origionalBrowserImage = new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Test.png");//browser.snapshot(sP, nextTextPicture);//new Image("http://www.nanofirm.org/scimagorder.com/Pictures/Pixies%20Text.png");//
		//secondStackPane[0].getChildren().add(browser);

		//secondScene[0] = new Scene(secondStackPane[0]);
		//secondaryStage.setScene(secondScene[0]);

		//secondaryStage.setFullScreen(true);
		//secondaryStage.show();
		//JUST THIS DISPLAYS BROWSER!!!!!






		//nextTextPicture = secondScene[0].snapshot(null);

		//Image origionalBrowserImage = secondScene[0].snapshot(null);//browser.snapshot(sP, nextTextPicture);
		//Image origionalBrowserImage = new Image("http://www.nanofirm.org/scimagorder.com/Pictures/FatLevels.png");

		///TEST


		/*try { secondEnc.finish(); }
		catch(IOException ie) { ie.printStackTrace(); }//*/

		//encFinished = true;
		//}
		/*webEngine.getLoadWorker().stateProperty().addListener(
	        new ChangeListener<State>() {
	            public void changed(ObservableValue ov, State oldState, State newState) {
	                if (newState == State.SUCCEEDED) {
	                    secondaryStage.setTitle(webEngine.getLocation());
	                }
	            }
	        });*/
		/*browser.getEngine().getLoadWorker().stateProperty().addListener(
			  (ObservableValue<? extends worker.State> observable,
			    worker.State oldValue,
			    worker.State newValue) -> {
			    if( newValue != worker.State.SUCCEEDED ) {
			      return;
			    }

			    // Your logic here
			  } );*/

		//if (worker.State.SUCCEEDED == true)
		//{


		//}
		/*secondScene.setOnKeyReleased(new EventHandler<KeyEvent>()
	{
		@Override
		public void handle(KeyEvent event)
		{
			if ( event.isAltDown() == true)
			{
				switch (event.getCode())
				{
					case ENTER: secondaryStage.setFullScreen(!secondaryStage.isFullScreen()); break;
				}
			}
		}
	});//*
		secondScene[(int)secondFRateDivisor].setOnKeyReleased(new EventHandler<KeyEvent>()
		{
			@Override
			public void handle(KeyEvent event)
			{
				if ( event.isAltDown() == true)
				{
					switch (event.getCode())
					{
					case ENTER: secondaryStage.setFullScreen(!secondaryStage.isFullScreen()); break;
					}
				}
			}
		});
	//*/
		//browser.snapshot(sP, nextTextPicture);
	}
	//@Override
	public void onKeyPressed(KeyEvent secondEvent) {
		if (secondEvent.getKeyCode() == KeyCode.ESCAPE.hashCode()) {
			System.exit(0);
		}
	}// */
	
	public static void main(String[] args) throws IOException
	{
		/*args.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
        {
            public void handle(MouseEvent event) 
            {
                System.exit(0);
            }
        });// */
		launch(args);

	}

}







package rainbowPackage;

import javafx.scene.paint.Paint.*;
import javafx.scene.paint.Color;

public class RainbowPattern2D //For All Rainbow Patterns To Be Displayed With RainbowSoftColor.java Functions Determining Rainbow/Custom Colors Variation
{
	public double[] RGB = {0,0,0}, ARGB = {0,0,0,1};
	public Color FXColor;
	public double ColorBeingChecked = 0, OpacityBeingChecked = 1;
	public RainbowSoftColor color = new RainbowSoftColor( new double[]{0,0,0,1} );
	
	public RainbowPattern2D( Color FXColor )
	{
		this.FXColor = FXColor;
		this.color = new RainbowSoftColor( FXColor );
		this.RGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 };
		this.ARGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255, FXColor.getOpacity() };
	}
	public RainbowPattern2D( double[] ARGB )
	{
		for  (int z = 0; z <= 2; z++)
		{
			this.RGB[z] = ColorValueFitter(ARGB[z]);
			this.ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		if ( ARGB.length == 3 )
		{
			this.ARGB = new double[4];
			for  (int z = 0; z <= 2; z++)
				this.ARGB[z] = ColorValueFitter(RGB[z]);
			ARGB[3] = 1;
		}
		else
			this.ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.color = new RainbowSoftColor( ARGB );
		this.FXColor = color.ToFXColor();
	}
	public RainbowPattern2D()
	{
		this.RGB = new double[]{0,0,0};
		this.ARGB = new double[]{0,0,0,1};
		this.color = new RainbowSoftColor( RGB );
		this.FXColor = color.ToFXColor();
	}
	public Color ToFXColor ()
	{
		this.FXColor = color.ToFXColor();
		return FXColor;
	}
	public Color ToFXColor ( double[] ARGB )
	{
		for  (int z = 0; z <= 2; z++)
		{
			this.RGB[z] = ColorValueFitter(ARGB[z]);
			this.ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		if ( ARGB.length == 3 )
		{
			this.ARGB = new double[4];
			for  (int z = 0; z <= 2; z++)
				this.ARGB[z] = ColorValueFitter(RGB[z]);
			ARGB[3] = 1;
		}
		else
			this.ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.color = new RainbowSoftColor( ARGB );
		this.FXColor = color.ToFXColor();
		return FXColor;
	}
	public Object RainbowSoftColorFunction(double ColorInterval, double Loc, RainbowSoftColor ColorBefore, RainbowSoftColor ColorAfter)//Top Bar At Top In SimpleDiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Loc/ColorInterval + ColorBefore.RGB[z] ) );
			ARGB[z] = ColorValueFitter( RGB[z] );
		}
		ARGB[3] = 1;
		this.color = new RainbowSoftColor( RGB );
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbow(double ColorInterval, double Loc)
	{
		this.color.RainbowSoftColorRainbowFunction(ColorInterval, Loc);//1st Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbow(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations)
	{
		this.color.RainbowSoftColorRainbowFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);//2nd Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbow(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, boolean Adjusted )
	{
		if ( Adjusted )
			this.color.RainbowSoftColorRainbowFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);//3rd Square In SimpleDiagnosticsClass.java
		else
			this.color.RainbowSoftColorRainbowFunctionUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);//4th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbowReverse(double ColorInterval, double Loc)
	{
		this.color.RainbowSoftColorRainbowFunctionReverse(ColorInterval, Loc);//5th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbowReverse(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations )
	{
		this.color.RainbowSoftColorRainbowFunctionReverseAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);//6th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbowReverse(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, boolean Adjusted )
	{
		if ( Adjusted )
			this.color.RainbowSoftColorRainbowFunctionReverseAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);//7th Square In SimpleDiagnosticsClass.java
		else
			this.color.RainbowSoftColorRainbowFunctionReverseUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);//8th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double[][] RGBcolorArray)
	{
		this.color.RainbowSoftCustomColorFunction(ColorInterval, Loc, RGBcolorArray);//9th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, Color[] FXcolorArray)
	{
		this.color.RainbowSoftCustomColorFunction(ColorInterval, Loc, FXcolorArray);//10th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, double[][] ARGBcolorArray )
	{
		this.color.RainbowSoftCustomColorFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, ARGBcolorArray);//11th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, double[][] ARGBcolorArray, boolean Adjusted )
	{
		if ( Adjusted )
			this.color.RainbowSoftCustomColorFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, ARGBcolorArray);//12th Square In SimpleDiagnosticsClass.java
		else
			this.color.RainbowSoftCustomColorFunctionUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, ARGBcolorArray);//13th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray )
	{
		//System.out.println( "2D FXcolors Brightnesses" + FXcolorArray[0].getBrightness() + FXcolorArray[1].getBrightness() + FXcolorArray[2].getBrightness() + FXcolorArray[3].getBrightness() + FXcolorArray[4].getBrightness() + FXcolorArray[5].getBrightness() );
		this.color.RainbowSoftCustomColorFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, FXcolorArray);//14th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, boolean Adjusted )
	{
		//System.out.println( "2D FXcolors Brightnesses" + FXcolorArray[0].getBrightness() + FXcolorArray[1].getBrightness() + FXcolorArray[2].getBrightness() + FXcolorArray[3].getBrightness() + FXcolorArray[4].getBrightness() + FXcolorArray[5].getBrightness() );
		if ( Adjusted )
			this.color.RainbowSoftCustomColorFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, FXcolorArray);//15th Square In SimpleDiagnosticsClass.java
		else
			this.color.RainbowSoftCustomColorFunctionUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, FXcolorArray);//16th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbow(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter )
	{
		this.color.RainbowSoftColorRainbowTransparencyFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter);//17th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbow(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, boolean Adjusted, double OpacityBefore, double OpacityAfter )
	{
		if ( Adjusted )
			this.color.RainbowSoftColorRainbowTransparencyFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter);//18th Square In SimpleDiagnosticsClass.java
		else
			this.color.RainbowSoftColorRainbowTransparencyFunctionUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter);//19th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbowReverse(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter )
	{
		this.color.RainbowSoftColorRainbowTransparencyFunctionReverseAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter);//20th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleRainbowReverse(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, boolean Adjusted, double OpacityBefore, double OpacityAfter )
	{
		if ( Adjusted )
			this.color.RainbowSoftColorRainbowTransparencyFunctionReverseAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter);//21st Square In SimpleDiagnosticsClass.java
		else
			this.color.RainbowSoftColorRainbowTransparencyFunctionReverseUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter);//22nd Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, double[][] RGBcolorArray, boolean Adjusted, double OpacityBefore, double OpacityAfter )
	{
		if ( Adjusted )
			this.color.RainbowSoftCustomColorTransparencyFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, RGBcolorArray, OpacityBefore, OpacityAfter);//23rd Square In SimpleDiagnosticsClass.java
		else
			this.color.RainbowSoftCustomColorTransparencyFunctionUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, RGBcolorArray, OpacityBefore, OpacityAfter);//24th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, boolean Adjusted, double OpacityBefore, double OpacityAfter )
	{
		if ( Adjusted )
			this.color.RainbowSoftCustomColorTransparencyFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, FXcolorArray, OpacityBefore, OpacityAfter);//25th Square In SimpleDiagnosticsClass.java
		else
			this.color.RainbowSoftCustomColorTransparencyFunctionUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, FXcolorArray, OpacityBefore, OpacityAfter);//26th Square In SimpleDiagnosticsClass.java
		this.RGB = color.RGB;
		this.ARGB = color.ARGB;
		this.FXColor = color.ToFXColor();
		return color;
	}
	//Build BasicColorSliderDiagnosticsClass.java
	//Build BasicColorToSimilarDiagnosticsClass.java USE FXcolor.invert!
	//Build BasicTransparencySliderDiagnosticsClass.java
	//Build RainbowSoftColorDiagnosticsClass.java
	//Build SimpleRainbowPattern2DDiagnosticsClass.java First With Color To Similar Tested In ???27th??? Square In In SimpleDiagnosticsClass.java 3 Horizontal x 9 Vertical Under 3 Bars
	//Formula String At End Of Complex Labeled Objects Instead Of Simple Labeled Objects
	//Formula Solver Which Reads Formula String And Processes Formula Into Loc Within Color Interval Or OutPuts Same Loc With Console Readout "Formula Not Found, No Formula Used -> Variable Sent Through Formula Processor Without Change."
	//Build ComplexRainbowPattern2DDiagnosticsClass.java Before Testing More Than 1 Formula
	public double ColorValueFitter ( double ColorToBeChecked )//27th Square In SimpleDiagnosticsClass.java
	{
		this.ColorBeingChecked = Math.abs(ColorToBeChecked);
		while ( ColorBeingChecked > 255)
			ColorBeingChecked = ColorBeingChecked - 255;
		return ColorBeingChecked;
	}
	public double OpacityValueFitter ( double OpacityToBeChecked )//28th Square In SimpleDiagnosticsClass.java
	{
		this.OpacityBeingChecked = Math.abs(OpacityToBeChecked);
		while ( OpacityBeingChecked > 1)
			OpacityBeingChecked = OpacityBeingChecked - 1;
		return OpacityBeingChecked;
	}
	public void set(double[] RGB) { this.RGB = RGB; this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) ); this.color = new RainbowSoftColor( RGB ); }//29th Square In SimpleDiagnosticsClass.java
	public void set(Color FXColor) { this.FXColor = FXColor; this.RGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 }; this.color = new RainbowSoftColor( RGB ); }//30th Square In SimpleDiagnosticsClass.java
	public Object get() { return RGB; }//31st Square In SimpleDiagnosticsClass.java
}







package rainbowPackage;

import javafx.scene.paint.Paint.*;
import javafx.scene.paint.Color;

public class RainbowSoft2D //RainbowSoft2D Houses A Series Of RainbowVideo.java Videos Or RainbowColorCodeSchemes.java For Frames

//FOR RainbowColorCodeSchemes.java! To Use RainbowSoftColorCodes And Access RainbowPattern2D.java Classes. This Class RainbowSoft2D Deals With Color Coding On 1 Layers To Make A Frame For RainbowVideo.java Which Accesses
{						   //This Class
	public double[] RGB;
	public Color FXColor;
	public double ColorBeingChecked = 0;
	public RainbowSoftColor color = new RainbowSoftColor( new double[]{0,0,0} );
	
	/*public RainbowSoft2D( Color FXColor )
	{
		this.FXColor = FXColor;
		this.color = new RainbowSoftColor( RGB );
		this.RGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 };
	}
	public RainbowSoft2D( double[] RGB )
	{
		this.RGB = RGB;
		this.color = new RainbowSoftColor( RGB );
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
	}
	public RainbowSoft2D()
	{
		this.RGB = new double[]{0,0,0,0};
		this.color = new RainbowSoftColor( RGB );
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
	}
	public Color ToFXColor ()
	{
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return FXColor;
	}
	public Color ToFXColor ( double[] RGB )
	{
		this.RGB = RGB;
		this.color = new RainbowSoftColor( RGB );
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return FXColor;
	}
	public Object RainbowSoftColorFunction(double ColorInterval, double Loc, RainbowSoftColor ColorBefore, RainbowSoftColor ColorAfter)
	{
		for (int z = 0; z <= 2; z++)
			RGB[z] = ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Loc/ColorInterval + ColorBefore.RGB[z] );
		this.color = new RainbowSoftColor( RGB );
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleRainbow(double ColorInterval, double Loc)
	{
		this.color.RainbowSoftColorRainbowFunction(ColorInterval, Loc);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleRainbow(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations)
	{
		this.color.RainbowSoftColorRainbowFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleRainbow(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, boolean Adjusted )
	{
		if ( Adjusted )
			this.color.RainbowSoftColorRainbowFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);
		else
			this.color.RainbowSoftColorRainbowFunctionUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleRainbowReverse(double ColorInterval, double Loc)
	{
		this.color.RainbowSoftColorRainbowFunctionReverse(ColorInterval, Loc);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleRainbowReverse(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations )
	{
		this.color.RainbowSoftColorRainbowFunctionReverseAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleRainbowReverse(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, boolean Adjusted )
	{
		if ( Adjusted )
			this.color.RainbowSoftColorRainbowFunctionReverseAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);
		else
			this.color.RainbowSoftColorRainbowFunctionReverseUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double[][] RGBcolorArray)
	{
		this.color.RainbowSoftColorRainbowFunction(ColorInterval, Loc, RGBcolorArray);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, Color[] FXcolorArray)
	{
		this.color.RainbowSoftColorRainbowFunction(ColorInterval, Loc, FXcolorArray);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, double[][] RGBcolorArray )
	{
		this.color.RainbowSoftColorRainbowFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, RGBcolorArray);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, double[][] RGBcolorArray, boolean Adjusted )
	{
		if ( Adjusted )
			this.color.RainbowSoftColorRainbowFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, RGBcolorArray);
		else
			this.color.RainbowSoftColorRainbowFunctionUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, RGBcolorArray);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray )
	{
		//System.out.println( "2D FXcolors Brightnesses" + FXcolorArray[0].getBrightness() + FXcolorArray[1].getBrightness() + FXcolorArray[2].getBrightness() + FXcolorArray[3].getBrightness() + FXcolorArray[4].getBrightness() + FXcolorArray[5].getBrightness() );
		this.color.RainbowSoftColorRainbowFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, FXcolorArray);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}
	public Object SimpleCustomColor(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, boolean Adjusted )
	{
		//System.out.println( "2D FXcolors Brightnesses" + FXcolorArray[0].getBrightness() + FXcolorArray[1].getBrightness() + FXcolorArray[2].getBrightness() + FXcolorArray[3].getBrightness() + FXcolorArray[4].getBrightness() + FXcolorArray[5].getBrightness() );
		if ( Adjusted )
			this.color.RainbowSoftColorRainbowFunctionAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, FXcolorArray);
		else
			this.color.RainbowSoftColorRainbowFunctionUnAdjusted(ColorInterval, Loc, BrightnessMultiplyer, Gradations, FXcolorArray);
		this.RGB = color.RGB;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) );
		return color;
	}//*/
	public double ColorValueFitter ( double ColorToBeChecked )
	{
		this.ColorBeingChecked = Math.abs(ColorToBeChecked);
		while ( ColorBeingChecked > 255)
			ColorBeingChecked = ColorBeingChecked - 255;
		return ColorBeingChecked;
	}
	public void set(double[] RGB) { this.RGB = RGB; this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])) ); this.color = new RainbowSoftColor( RGB ); }
	public void set(Color FXColor) { this.FXColor = FXColor; this.RGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 }; this.color = new RainbowSoftColor( RGB ); }
	public Object get() { return RGB; }
}






package rainbowPackage;

import javafx.scene.paint.Paint.*;
import javafx.scene.paint.Color;

public class RainbowSoftColor //For All Rainbows To Be Defined Using Multiple ColorSlider.java Classes Involving Rainbow Color And Color Sequences In This Class; RainbowSoftColor.java
{
	ColorSlider black = new ColorSlider( new double[]{0,0,0} );
	ColorSlider white = new ColorSlider( new double[]{255,255,255} );

	ColorSlider color = black;
	ColorSlider tempColor = white;

	TransparencySlider colorTransparency = new TransparencySlider( new double[]{0,0,0,1} );
	TransparencySlider tempColorTransparency = new TransparencySlider( new double[]{255,255,255,1} );

	ColorSlider customColors[] = new ColorSlider[] { new ColorSlider( new double[]{0,0,0} ), new ColorSlider( new double[]{255,255,255} ) };
	TransparencySlider customTransparencyColors[] = new TransparencySlider[] { new TransparencySlider( new double[]{0,0,0,1} ), new TransparencySlider( new double[]{255,255,255,1} ) };

	ColorSlider skyblue = new ColorSlider( new double[]{134,206,249} );
	ColorSlider oxylblue = new ColorSlider( new double[]{0,255,255} );
	ColorSlider pink = new ColorSlider( new double[]{255,64,143} );
	ColorSlider blue = new ColorSlider( new double[]{0,0,192} );
	ColorSlider red = new ColorSlider( new double[]{193,0,0} );
	ColorSlider purple = new ColorSlider( new double[]{122,0,178} );
	ColorSlider orange = new ColorSlider( new double[]{255,134,0} );
	ColorSlider green = new ColorSlider( new double[]{0,133,50} );
	ColorSlider yellow = new ColorSlider( new double[]{246,252,15} );
	ColorSlider teal = new ColorSlider( new double[]{3,224,149} );
	ColorSlider bronze = new ColorSlider( new double[]{152,123,46} );
	ColorSlider silver = new ColorSlider( new double[]{193,192,192} );
	ColorSlider gold = new ColorSlider( new double[]{205,191,44} );
	ColorSlider lime = new ColorSlider( new double[]{126,193,33} );
	ColorSlider brown = new ColorSlider( new double[]{131,103,71} );
	ColorSlider oxylBlue0FF = new ColorSlider( new double[]{0,255,255} );

	public double[] RGB = {0,0,0};// = {0,0,0};
	public double[] ARGB = {0,0,0,1};// = {0,0,0};
	public Color FXColor;
	public double ColorBeingChecked = 0, OpacityBeingChecked = 1, rainbowInterval = 1, rainbowEndsEachLengthOfExtrema = 1, rainbowLengthWOextrema = 1, rainbowAdjustedColorInterval = 1;//, ColorToBeChecked = 0;
	//ColorValueFit colorValueFit = new ColorValueFit(0.);

	public RainbowSoftColor()//1st Square DiagnosticsClass.java
	{
		this.RGB = new double[]{0,0,0};
		this.ARGB = new double[]{0,0,0,1};
		//this.color.RGB = RGB;
		this.color = new ColorSlider( RGB );
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
	}
	public RainbowSoftColor( Color FXColor )//2nd Square DiagnosticsClass.java
	{
		this.FXColor = FXColor;
		//this.color.RGB = RGB;
		this.color = new ColorSlider( RGB );
		this.colorTransparency = new TransparencySlider( ARGB );
		this.RGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 };
		this.ARGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255, FXColor.getOpacity() };
	}
	public RainbowSoftColor( double[] ARGB )//3rd Square DiagnosticsClass.java
	{
		this.ARGB = ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		if ( ARGB.length == 3 )
			ARGB = new double[] { ARGB[0], ARGB[1], ARGB[2], 1 };
		else
			ARGB[3] = OpacityValueFitter(ARGB[3]);
		//this.color.RGB = RGB;
		this.color = new ColorSlider( RGB );
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
	}
	public Object RainbowSoftColorRainbowFunction(double RainbowLength, double CoreVariable)//4th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, orange);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, orange, yellow);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, yellow, green);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, green, teal);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, teal, blue);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, blue, purple);
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	public Object RainbowSoftColorFunction(double SliderInterval, double Loc, RainbowSoftColor ColorBefore, RainbowSoftColor ColorAfter)//5th Square DiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Loc/SliderInterval + ColorBefore.RGB[z] ) );
			ARGB[z] = ColorValueFitter( RGB[z] );
		}
		ARGB[3] = 1;
		//this.color.RGB = RGB;
		this.color = new ColorSlider( RGB );
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( RGB );
	}
	public Object RainbowSoftColorFunction(double SliderInterval, double Loc, double BrightnessMultiplyer, RainbowSoftColor ColorBefore, RainbowSoftColor ColorAfter)//6th Square DiagnosticsClass.java
	{
		if ( BrightnessMultiplyer < 1)
			for (int z = 0; z <= 2; z++)
				RGB[z] = ( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Loc/SliderInterval + ColorBefore.RGB[z] ) * BrightnessMultiplyer);
		else
			for (int z = 0; z <= 2; z++)
			{
				RGB[z] = ( ( (ColorAfter.RGB[z] - ColorBefore.RGB[z]) * Loc/0 + ColorBefore.RGB[z] ) );
				RGB[z] = ( (255 - RGB[z]) / BrightnessMultiplyer + RGB[z] );
			}
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		//this.color.RGB = RGB;
		this.color = new ColorSlider( RGB );
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( RGB );
	}
	/*public Object RainbowSoftColorRainbowFunction(double RainbowLength, double CoreVariable, double BrightnessMultiplyer)
	{
		if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, orange);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, orange, yellow);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, yellow, green);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, green, teal);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, teal, blue);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, blue, purple);
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				RGB[z] = RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				RGB[z] = (255 - RGB[z]) / BrightnessMultiplyer + RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.RGB = color.RGB;
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}//*/
	public Object RainbowSoftColorRainbowFunctionReverse(double RainbowLength, double CoreVariable)//7th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, blue);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, blue, teal);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, teal, pink);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, pink, yellow);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, yellow, orange);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, orange, red);
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	public Object RainbowSoftCustomColorFunction(double RainbowLength, double CoreVariable, double[][] RGBcolorArray)//8th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		this.customColors = new ColorSlider[RGBcolorArray.length];
		for (int x = 0; x < RGBcolorArray.length; x++)
		{
			this.tempColor = new ColorSlider( RGBcolorArray[x] );
			this.tempColor.set( RGBcolorArray[x] );
			this.customColors[x] = tempColor;
		}
		for (int x = 0; x <= RGBcolorArray.length - 2; x++)
			if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )//For Custom RGBcolorArray
			{
				color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, customColors[x], customColors[x + 1]);
				break;
			}
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	public Object RainbowSoftCustomColorFunction(double RainbowLength, double CoreVariable, Color[] FXcolorArray)//9th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		this.customColors = new ColorSlider[FXcolorArray.length];
		for (int x = 0; x < FXcolorArray.length; x++)
		{
			this.tempColor = new ColorSlider( FXcolorArray[x] );
			this.tempColor.set( FXcolorArray[x] );
			this.customColors[x] = tempColor;
		}
		for (int x = 0; x <= FXcolorArray.length - 2; x++)
			if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )//For Custom RGBcolorArray
			{
				color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, customColors[x], customColors[x + 1]);
				break;
			}
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	/*public Object RainbowSoftColorRainbowFunctionReverse(double RainbowLength, double CoreVariable, double BrightnessMultiplyer)
	{
		if ( CoreVariable < ( rainbowInterval / ( 2 + Gradations) ) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		else if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, blue, Gradations);
		else if ( CoreVariable < ( 2 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, blue, teal, Gradations);
		else if ( CoreVariable < ( 3 * rainbowInterval) )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, teal, pink, Gradations);
		else if ( CoreVariable < ( 4 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, pink, yellow, Gradations);
		else if ( CoreVariable < ( 5 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, yellow, orange, Gradations);
		else if ( CoreVariable < 6 * rainbowInterval - rainbowInterval / ( 2 + Gradations) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, orange, red, Gradations);
		else
			color.ColorSliderFunction(RainbowLength, CoreVariable, red, red);
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				RGB[z] = RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				RGB[z] = (255 - RGB[z]) / BrightnessMultiplyer + RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.RGB = color.RGB;
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}//*/
	/*public Object RainbowSoftColorRainbowFunctionUnAdjustedGradations(double RainbowLength, double CoreVariable, int Gradations)
	{
		if ( CoreVariable < ( rainbowInterval / ( 2 + Gradations) ) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);
		else if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, orange, Gradations);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, orange, yellow, Gradations);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, yellow, green, Gradations);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, green, teal, Gradations);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, teal, blue, Gradations);
		else if ( CoreVariable < 6 * rainbowInterval - rainbowInterval / ( 2 + Gradations) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, blue, purple, Gradations);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		this.RGB = color.RGB;
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( RGB );
	}*/
	public Object RainbowSoftColorRainbowFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations)//10th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < ( rainbowInterval / ( 2 + Gradations) ) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);
		else if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, orange, Gradations);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, orange, yellow, Gradations);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, yellow, green, Gradations);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, green, teal, Gradations);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, teal, blue, Gradations);
		else if ( CoreVariable < 6 * rainbowInterval - rainbowInterval / ( 2 + Gradations) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, blue, purple, Gradations);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.RGB[z] = color.RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.RGB[z] = (255 - color.RGB[z]) / BrightnessMultiplyer + color.RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	/*public Object RainbowSoftColorRainbowFunctionReverseUnAdjustedGradations(double RainbowLength, double CoreVariable, int Gradations)
	{
		if ( CoreVariable < ( rainbowInterval / ( 2 + Gradations) ) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		else if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, blue, Gradations);
		else if ( CoreVariable < ( 2 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, blue, teal, Gradations);
		else if ( CoreVariable < ( 3 * rainbowInterval) )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, teal, pink, Gradations);
		else if ( CoreVariable < ( 4 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, pink, yellow, Gradations);
		else if ( CoreVariable < ( 5 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, yellow, orange, Gradations);
		else if ( CoreVariable < 6 * rainbowInterval - rainbowInterval / ( 2 + Gradations) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, orange, red, Gradations);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);
		this.RGB = color.RGB;
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( RGB );
	}//*/
	public Object RainbowSoftColorRainbowFunctionReverseUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations)//11th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, blue, Gradations);
		else if ( CoreVariable < ( 2 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, blue, teal, Gradations);
		else if ( CoreVariable < ( 3 * rainbowInterval) )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, teal, pink, Gradations);
		else if ( CoreVariable < ( 4 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, pink, yellow, Gradations);
		else if ( CoreVariable < ( 5 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, yellow, orange, Gradations);
		else if ( CoreVariable < 6 * rainbowInterval - rainbowInterval / ( 2 + Gradations) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, orange, red, Gradations);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);

		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.RGB[z] = color.RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.RGB[z] = (255 - color.RGB[z]) / BrightnessMultiplyer + color.RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	public Object RainbowSoftColorRainbowFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations)//12th Square DiagnosticsClass.java
	{//CHANGE IN ALL
		rainbowInterval = RainbowLength / 6;
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / 6;
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, red, red );
		else if ( CoreVariable < rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowEndsEachLengthOfExtrema, Gradations, red, orange );
		else if ( CoreVariable < 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, orange, yellow );
		else if ( CoreVariable < 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 2 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, yellow, green );
		else if ( CoreVariable < 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 3 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, green, teal );
		else if ( CoreVariable < 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 4 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, teal, blue );
		else if ( CoreVariable < 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 5 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, blue, purple );
		else
			color.ColorSliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable - 6 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, purple, purple );
		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.RGB), new TransparencySlider(teal.RGB), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.RGB[z] = color.RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.RGB[z] = (255 - color.RGB[z]) / BrightnessMultiplyer + color.RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );//colorTransparency.ARGB );
	}
	public Object RainbowSoftColorRainbowFunctionReverseAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations)//13th Square DiagnosticsClass.java
	{//CHANGE IN ALL
		rainbowInterval = RainbowLength / 6;
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / 6;// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, purple, purple );
		else if ( CoreVariable < rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowEndsEachLengthOfExtrema, Gradations, purple, blue );
		else if ( CoreVariable < 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, blue, teal );
		else if ( CoreVariable < 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 2 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, teal, pink );
		else if ( CoreVariable < 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 3 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, pink, yellow );
		else if ( CoreVariable < 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 4 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, yellow, orange );
		else if ( CoreVariable < 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 5 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, orange, red );
		else
			color.ColorSliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable - 6 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, red, red );
		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.RGB), new TransparencySlider(teal.RGB), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.RGB[z] = color.RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.RGB[z] = (255 - color.RGB[z]) / BrightnessMultiplyer + color.RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(color.RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );//colorTransparency.ARGB );
	}
	public Object RainbowSoftColorRainbowTransparencyFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter)//14th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, BrightnessMultiplyer, Gradations, new TransparencySlider (red.RGB), new TransparencySlider (orange.RGB), OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 2 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (orange.RGB), new TransparencySlider (yellow.RGB), ( OpacityAfter - OpacityBefore ) * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 2 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 3 * rainbowInterval) )		
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (yellow.RGB), new TransparencySlider (green.RGB), ( OpacityAfter - OpacityBefore ) * 2 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 3 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 4 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (green.RGB), new TransparencySlider (teal.RGB), ( OpacityAfter - OpacityBefore ) * 3 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 4 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 5 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (teal.RGB), new TransparencySlider (blue.RGB), ( OpacityAfter - OpacityBefore ) * 4 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 5 * rainbowInterval / RainbowLength + OpacityBefore );
		else
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (blue.RGB), new TransparencySlider (purple.RGB), ( OpacityAfter - OpacityBefore ) * 5 * rainbowInterval / RainbowLength + OpacityBefore, OpacityAfter );
		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.RGB), new TransparencySlider(teal.RGB), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.ARGB[z] = colorTransparency.ARGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.ARGB[z] = (255 - colorTransparency.ARGB[z]) / BrightnessMultiplyer + colorTransparency.ARGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.ARGB = colorTransparency.ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		this.FXColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.ARGB );//colorTransparency.ARGB );
	}
	public Object RainbowSoftColorRainbowTransparencyFunctionReverseUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter)//15th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < rainbowInterval)//For Normal Rainbow Use This Instead Of The Others
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, BrightnessMultiplyer, Gradations, new TransparencySlider (purple.RGB), new TransparencySlider (blue.RGB), OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 2 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (blue.RGB), new TransparencySlider (teal.RGB), ( OpacityAfter - OpacityBefore ) * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 2 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 3 * rainbowInterval) )		
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (teal.RGB), new TransparencySlider (pink.RGB), ( OpacityAfter - OpacityBefore ) * 2 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 3 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 4 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (pink.RGB), new TransparencySlider (yellow.RGB), ( OpacityAfter - OpacityBefore ) * 3 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 4 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 5 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (yellow.RGB), new TransparencySlider (orange.RGB), ( OpacityAfter - OpacityBefore ) * 4 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 5 * rainbowInterval / RainbowLength + OpacityBefore );
		else
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (orange.RGB), new TransparencySlider (red.RGB), ( OpacityAfter - OpacityBefore ) * 5 * rainbowInterval / RainbowLength + OpacityBefore, OpacityAfter );

		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.RGB), new TransparencySlider(teal.RGB), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.ARGB[z] = colorTransparency.ARGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.ARGB[z] = (255 - colorTransparency.ARGB[z]) / BrightnessMultiplyer + colorTransparency.ARGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.ARGB = colorTransparency.ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		this.FXColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.ARGB );//colorTransparency.ARGB );
	}
	public Object RainbowSoftCustomColorFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double[][] RGBcolorArray)//16th Square DiagnosticsClass.java
	{
		this.customColors = new ColorSlider[RGBcolorArray.length];
		for (int x = 0; x < RGBcolorArray.length; x++)
		{
			this.tempColor = new ColorSlider( RGBcolorArray[x] );
			this.tempColor.set( RGBcolorArray[x] );
			this.customColors[x] = tempColor;
		}
		for (int x = 0; x <= RGBcolorArray.length - 2; x++)
			if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )//For Custom RGBcolorArray
			{
				color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, customColors[x], customColors[x + 1], Gradations);
				break;
			}
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.RGB[z] = color.RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.RGB[z] = (255 - color.RGB[z]) / BrightnessMultiplyer + color.RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	public Object RainbowSoftCustomColorFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray)//17th Square DiagnosticsClass.java
	{
		//System.out.println( "Function FXcolors Brightnesses" + FXcolorArray[0].getBrightness() + FXcolorArray[1].getBrightness() + FXcolorArray[2].getBrightness() + FXcolorArray[3].getBrightness() + FXcolorArray[4].getBrightness() + FXcolorArray[5].getBrightness() );
		//System.out.println("FXcolorArray.length = " + FXcolorArray.length);
		this.customColors = new ColorSlider[FXcolorArray.length];
		for (int x = 0; x < FXcolorArray.length; x++)
		{
			this.tempColor = new ColorSlider( FXcolorArray[x] );
			this.tempColor.set( FXcolorArray[x] );
			this.customColors[x] = tempColor;
		}
		//System.out.println( "customColors[x] R: " + customColors[0].FXColor.getRed() + " G: " + customColors[0].FXColor.getGreen() + " B: " + customColors[0].FXColor.getBlue() +" Brightneess:" + customColors[2].FXColor.getBrightness() + customColors[3].FXColor.getBrightness() + customColors[4].FXColor.getBrightness() + customColors[5].FXColor.getBrightness() );
		for (int x = 0; x <= FXcolorArray.length - 2; x++)
			if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )//For Custom RGBcolorArray
			{
				color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, customColors[x], customColors[x + 1], Gradations);
				break;
			}
		//System.out.println( "color.RGB = R: " + color.RGB[0] + " G: " + color.RGB[1] + " B: " + color.RGB[2] );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.RGB[z] = color.RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.RGB[z] = (255 - color.RGB[z]) / BrightnessMultiplyer + color.RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		//System.out.println( "color.RGB = R: " + color.RGB[0] + " G: " + color.RGB[1] + " B: " + color.RGB[2] );
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = 1;
		this.colorTransparency = new TransparencySlider( ARGB );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	public Object RainbowSoftCustomColorFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double[][] RGBcolorArray)//18th Square DiagnosticsClass.java
	{
		this.customColors = new ColorSlider[RGBcolorArray.length];
		rainbowInterval = RainbowLength / ( RGBcolorArray.length - 1 );
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / ( RGBcolorArray.length - 1 );// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		for (int x = 0; x < RGBcolorArray.length; x++)
		{
			tempColor = new ColorSlider( RGBcolorArray[x] );
			tempColor.set( RGBcolorArray[x] );
			this.customColors[x] = tempColor;
		}
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			color = customColors[0];
		for (int x = 0; x <= customColors.length - 2; x++)
		{
			if ( CoreVariable >= x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema && CoreVariable < ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			{
				color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - x * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, 1, customColors[x], customColors[x + 1], Gradations );
				break;
			}
		}
		if ( CoreVariable > ( customColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color = customColors[customColors.length - 1];
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.RGB[z] = color.RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.RGB[z] = (255 - color.RGB[z]) / BrightnessMultiplyer + color.RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = OpacityValueFitter( 1 );
		this.color = new ColorSlider ( color.ToFXColor() );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	public Object RainbowSoftCustomColorFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray)//19th Square DiagnosticsClass.java
	{
		this.customColors = new ColorSlider[FXcolorArray.length];
		rainbowInterval = RainbowLength / ( FXcolorArray.length - 1 );
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / ( FXcolorArray.length - 1 );// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		for (int x = 0; x < FXcolorArray.length; x++)
		{
			tempColor = new ColorSlider( FXcolorArray[x] );
			tempColor.set( FXcolorArray[x] );
			this.customColors[x] = tempColor;
		}
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			color = customColors[0];
		for (int x = 0; x <= customColors.length - 2; x++)
		{
			if ( CoreVariable >= x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema && CoreVariable < ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			{
				color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - x * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, 1, customColors[x], customColors[x + 1], Gradations );
				break;
			}
		}
		if ( CoreVariable > ( customColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color = customColors[customColors.length - 1];
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.RGB[z] = color.RGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.RGB[z] = (255 - color.RGB[z]) / BrightnessMultiplyer + color.RGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.RGB = color.RGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(RGB[z]);
			ARGB[z] = ColorValueFitter(RGB[z]);
		}
		ARGB[3] = OpacityValueFitter( 1 );
		this.color = new ColorSlider ( color.ToFXColor() );
		this.FXColor = color.ToFXColor();
		return new RainbowSoftColor( color.RGB );
	}
	public Object RainbowSoftCustomColorTransparencyFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double[][] ARGBcolorArray, double OpacityBefore, double OpacityAfter)//20th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / ( ARGBcolorArray.length - 1 );
		this.customTransparencyColors = new TransparencySlider[ARGBcolorArray.length];
		for (int x = 0; x < ARGBcolorArray.length; x++)
		{
			this.tempColorTransparency = new TransparencySlider( ARGBcolorArray[x] );
			this.tempColorTransparency.set( ARGBcolorArray[x] );
			this.customTransparencyColors[x] = tempColorTransparency;
		}
		for (int x = 0; x <= customTransparencyColors.length - 2; x++)
			if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )//For Custom RGBcolorArray
			{
				colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, Gradations, customTransparencyColors[x], customTransparencyColors[x + 1], ( OpacityAfter - OpacityBefore ) * ( x * rainbowInterval ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( ( x + 1 ) * rainbowInterval ) / RainbowLength + OpacityBefore );
				break;
			}
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.ARGB[z] = colorTransparency.ARGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.ARGB[z] = (255 - colorTransparency.ARGB[z]) / BrightnessMultiplyer + colorTransparency.ARGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.ARGB = colorTransparency.ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.color = new ColorSlider ( colorTransparency.ToFXColor() );
		this.FXColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.ARGB );
	}
	public Object RainbowSoftCustomColorTransparencyFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, double OpacityBefore, double OpacityAfter)//21st Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / ( FXcolorArray.length - 1 );
		this.customTransparencyColors = new TransparencySlider[FXcolorArray.length];
		for (int x = 0; x < FXcolorArray.length; x++)
		{
			this.tempColorTransparency = new TransparencySlider( FXcolorArray[x] );
			this.tempColorTransparency.set( FXcolorArray[x] );
			this.customTransparencyColors[x] = tempColorTransparency;
		}
		for (int x = 0; x <= customTransparencyColors.length - 2; x++)
			if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )//For Custom RGBcolorArray
			{
				colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, Gradations, customTransparencyColors[x], customTransparencyColors[x + 1], ( OpacityAfter - OpacityBefore ) * ( x * rainbowInterval ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( ( x + 1 ) * rainbowInterval ) / RainbowLength + OpacityBefore );
				break;
			}
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.ARGB[z] = colorTransparency.ARGB[z] * BrightnessMultiplyer;
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.ARGB[z] = colorTransparency.ARGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.ARGB[z] = (255 - colorTransparency.ARGB[z]) / BrightnessMultiplyer + colorTransparency.ARGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.ARGB = colorTransparency.ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.color = new ColorSlider ( colorTransparency.ToFXColor() );
		this.FXColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.ARGB );
	}
	public Object RainbowSoftColorRainbowTransparencyFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter)//22nd Square DiagnosticsClass.java
	{//CHANGE IN ALL
		rainbowInterval = RainbowLength / 6;
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / 6;
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, new TransparencySlider (red.RGB), new TransparencySlider (red.RGB), OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore );
		else if ( CoreVariable < rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (red.RGB), new TransparencySlider (orange.RGB), ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (orange.RGB), new TransparencySlider (yellow.RGB), ( OpacityAfter - OpacityBefore ) * ( rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )/ RainbowLength + OpacityBefore , ( OpacityAfter - OpacityBefore ) * ( 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 2 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (yellow.RGB), new TransparencySlider (green.RGB), ( OpacityAfter - OpacityBefore ) * ( 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 3 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (green.RGB), new TransparencySlider (teal.RGB),  ( OpacityAfter - OpacityBefore ) * ( 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 4 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (teal.RGB), new TransparencySlider (blue.RGB),  ( OpacityAfter - OpacityBefore ) * ( 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 5 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (blue.RGB), new TransparencySlider (purple.RGB), ( OpacityAfter - OpacityBefore ) * ( 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable - 6 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (purple.RGB), new TransparencySlider (purple.RGB),  OpacityAfter, OpacityAfter );
		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.RGB), new TransparencySlider(teal.RGB), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.ARGB[z] = colorTransparency.ARGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.ARGB[z] = (255 - colorTransparency.ARGB[z]) / BrightnessMultiplyer + colorTransparency.ARGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.color = new ColorSlider ( colorTransparency.ToFXColor() );
		this.FXColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.ARGB );//colorTransparency.ARGB );
	}
	public Object RainbowSoftColorRainbowTransparencyFunctionReverseAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter)//23rd Square DiagnosticsClass.java
	{//CHANGE IN ALL
		rainbowInterval = RainbowLength / 6;
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / 6;// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, new TransparencySlider (purple.RGB), new TransparencySlider (purple.RGB), OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore );
		else if ( CoreVariable < rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (purple.RGB), new TransparencySlider (blue.RGB), ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) + OpacityBefore );
		else if ( CoreVariable < 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (blue.RGB), new TransparencySlider (teal.RGB), ( OpacityAfter - OpacityBefore ) * ( rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore , ( OpacityAfter - OpacityBefore ) * ( 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 2 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (teal.RGB), new TransparencySlider (pink.RGB), ( OpacityAfter - OpacityBefore ) * ( 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 3 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (pink.RGB), new TransparencySlider (yellow.RGB),  ( OpacityAfter - OpacityBefore ) * ( 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 4 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (yellow.RGB), new TransparencySlider (orange.RGB),  ( OpacityAfter - OpacityBefore ) * ( 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 5 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (orange.RGB), new TransparencySlider (red.RGB), ( OpacityAfter - OpacityBefore ) * ( 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable - 6 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (red.RGB), new TransparencySlider (red.RGB), OpacityAfter, OpacityAfter );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.ARGB[z] = colorTransparency.ARGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.ARGB[z] = (255 - colorTransparency.ARGB[z]) / BrightnessMultiplyer + colorTransparency.ARGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.color = new ColorSlider ( colorTransparency.ToFXColor() );
		this.FXColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.ARGB );
	}
	public Object RainbowSoftCustomColorTransparencyFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double[][] ARGBcolorArray, double OpacityBefore, double OpacityAfter)//24th Square DiagnosticsClass.java
	{
		this.customTransparencyColors = new TransparencySlider[ARGBcolorArray.length];
		rainbowInterval = RainbowLength / ( ARGBcolorArray.length - 1 );
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / ( ARGBcolorArray.length - 1 );// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		for (int x = 0; x < ARGBcolorArray.length; x++)
		{
			tempColorTransparency = new TransparencySlider( ARGBcolorArray[x] );
			tempColorTransparency.set( ARGBcolorArray[x] );
			this.customTransparencyColors[x] = tempColorTransparency;
		}
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[0], customTransparencyColors[0], OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore );
		for (int x = 0; x <= customTransparencyColors.length - 2; x++)
		{
			if ( CoreVariable >= x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema && CoreVariable < ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			{
				colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - x * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, customTransparencyColors[x], customTransparencyColors[x + 1], ( OpacityAfter - OpacityBefore ) * ( x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
				break;
			}		}
		if ( CoreVariable > ( customTransparencyColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[customTransparencyColors.length - 1], customTransparencyColors[customTransparencyColors.length - 1], OpacityAfter, OpacityAfter );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.ARGB[z] = colorTransparency.ARGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.ARGB[z] = (255 - colorTransparency.ARGB[z]) / BrightnessMultiplyer + colorTransparency.ARGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.ARGB = colorTransparency.ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.color = new ColorSlider ( colorTransparency.ToFXColor() );
		this.FXColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.ARGB );
	}
	public Object RainbowSoftCustomColorTransparencyFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, double OpacityBefore, double OpacityAfter)//25th Square DiagnosticsClass.java
	{
		this.customTransparencyColors = new TransparencySlider[FXcolorArray.length];
		rainbowInterval = RainbowLength / ( FXcolorArray.length - 1 );
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / ( FXcolorArray.length - 1 );// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		for (int x = 0; x < FXcolorArray.length; x++)
		{
			tempColorTransparency = new TransparencySlider( FXcolorArray[x] );
			tempColorTransparency.set( FXcolorArray[x] );
			this.customTransparencyColors[x] = tempColorTransparency;
		}
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[0], customTransparencyColors[0], OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore );
		for (int x = 0; x <= customTransparencyColors.length - 2; x++)
		{
			if ( CoreVariable >= x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema && CoreVariable < ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			{
				colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - x * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, customTransparencyColors[x], customTransparencyColors[x + 1], ( OpacityAfter - OpacityBefore ) * ( x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
				break;
			}
		}
		if ( CoreVariable > ( customTransparencyColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[customTransparencyColors.length - 1], customTransparencyColors[customTransparencyColors.length - 1], OpacityAfter, OpacityAfter );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.ARGB[z] = colorTransparency.ARGB[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.ARGB[z] = (255 - colorTransparency.ARGB[z]) / BrightnessMultiplyer + colorTransparency.ARGB[z];
			}
		//this.FXColor = FXColor.rgb( Math.abs( (int)RGB[0] ), Math.abs( (int)RGB[1] ), Math.abs( (int)RGB[2] ) );
		this.ARGB = colorTransparency.ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			RGB[z] = ColorValueFitter(ARGB[z]);
			ARGB[z] = ColorValueFitter(ARGB[z]);
		}
		ARGB[3] = OpacityValueFitter(ARGB[3]);
		this.color = new ColorSlider ( colorTransparency.ToFXColor() );
		this.FXColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.ARGB );
	}
	public Color ToFXColor ()//26th Square DiagnosticsClass.java
	{
		this.FXColor = color.ToFXColor();
		return FXColor;
	}
	public Color ToFXColor ( double[] ARGB )//27th Square DiagnosticsClass.java
	{
		this.ARGB = ARGB;
		for (int z = 0; z <= 2; z++)
		{
			RGB[z] = ARGB[z];
		}
		this.color = new ColorSlider( RGB );
		this.colorTransparency = new TransparencySlider ( ARGB );
		this.FXColor = color.ToFXColor();
		return FXColor;
	}
	//tempFXColor = tempFXColor.rgb((int)color.RGB[0] , Math.abs( (int)color.RGB[1] ), (int)color.RGB[2]).invert();
	public Boolean ColorTooSimilarFunction(int Color1, int Color2)//28th Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int color1A = (Color1 >> 24) & 0xff;
		int color1R = (Color1 >> 16) & 0xff;
		int color1G = (Color1 >> 8) & 0xff;
		int color1B = (Color1) & 0xff;
		int color2A = (Color2 >> 24) & 0xff;
		int color2R = (Color2 >> 16) & 0xff;
		int color2G = (Color2 >> 8) & 0xff;
		int color2B = (Color2) & 0xff;
		/*
		int Color1A = Color1 / 16777216;
		int Color1R = ( Color1 - Color1A * 16777216 ) / 65536;
		int Color1G = ( Color1 - Color1A * 16777216 - Color1R * 65536 ) / 256;
		int Color1B = ( Color1 - Color1A * 16777216 - Color1R * 65536 - Color1G * 256);
		int Color2A = Color2 / 16777216;
		int Color2R = ( Color2 - Color2A * 16777216 ) / 65536;
		int Color2G = ( Color2 - Color2A * 16777216 - Color2R * 65536 ) / 256;
		int Color2B = ( Color2 - Color2A * 16777216 - Color2R * 65536 - Color2G * 256);// */
		int colorDifference = Math.abs(color1R - color2R) + Math.abs(color1G - color2G) + Math.abs(color1B - color2B);
		if ( colorDifference <= 164 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public Boolean ColorTooSimilarFunction( Color Color1, Color Color2)//29th Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int colorDifference = (int)( Math.abs(Color1.getRed() - Color2.getRed()) + Math.abs(Color1.getGreen() - Color2.getGreen()) + Math.abs(Color1.getBlue() - Color2.getBlue()) );
		if ( colorDifference <= 164 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public double ColorValueFitter ( double ColorToBeChecked )//30th Square DiagnosticsClass.java
	{
		this.ColorBeingChecked = Math.abs(ColorToBeChecked);
		while ( ColorBeingChecked > 255)
			ColorBeingChecked = ColorBeingChecked - 255;
		return ColorBeingChecked;
	}
	public double OpacityValueFitter ( double OpacityToBeChecked )//31st Square DiagnosticsClass.java
	{
		this.OpacityBeingChecked = Math.abs(OpacityToBeChecked);
		while ( OpacityBeingChecked > 1)
			OpacityBeingChecked = OpacityBeingChecked - 1;
		return OpacityBeingChecked;
	}
	
	public Object GlobalRainbowSoftSelectorFunction( double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, boolean Adjusted, Color[] FXcolorArray, double OpacityBefore, double OpacityAfter, boolean Reversed, boolean IsColorNum )//Separate RainbowSoftColorGlobalRainbowSoftSelector MultiComponent Diagnostic
	{
	
		System.out.println( "Use 'RainbowSoftColorRainbowFunction(double RainbowLength, double CoreVariable)' Instead Of GloabalRainbowSoftSelectorFunction! As It Will Be Faster" );
		return new RainbowSoftColor( colorTransparency.ARGB );
	}
	
	public void set(double[] ARGB) { this.ARGB = ARGB; for (int z = 0; z <= 2; z++)	{ RGB[z] = ARGB[z]; } this.FXColor = FXColor.rgb( (int)(ColorValueFitter(RGB[0])), (int)(ColorValueFitter(RGB[1])), (int)(ColorValueFitter(RGB[2])), OpacityValueFitter(ARGB[3])); this.color = new ColorSlider( RGB ); this.colorTransparency = new TransparencySlider ( ARGB ); }//32st Square DiagnosticsClass.java
	public void set(Color FXColor) { this.FXColor = FXColor; this.RGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 }; this.ARGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255, FXColor.getOpacity() }; this.color = new ColorSlider( RGB ); this.colorTransparency = new TransparencySlider ( ARGB ); }//33nd Square DiagnosticsClass.java
	public Object get() { return ARGB; }//34th Square DiagnosticsClass.java
	//public Object get() { return FXColor; }
}//*/


/*public class Color(double R, double G, double B)  Color
{
	RGB[0] = R;
	RGB[1] = G;
	RGB[2] = B;
	//return RGB;
}*/








package rainbowPackage;

import javafx.scene.paint.Paint.*;
import javafx.scene.paint.Color;

public class TransparencySlider //Basic Class For Variating Colors And Determining Transparency For RainbowSoftColor.java Class
{
	public double[] ARGB = {0,0,0,1};
	public Color FXColor;
	public double ColorBeingChecked = 0, OpacityBeingChecked = 1;//, ColorToBeChecked = 0;
	//ColorValueFit colorValueFit = new ColorValueFit(0.);
	public TransparencySlider()//1st Square DiagnosticsClass.java
	{
        this.ARGB = new double[]{0,0,0,1};
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
	}
	public TransparencySlider( Color FXColor )//2nd Square DiagnosticsClass.java
	{
		this.FXColor = FXColor;
        this.ARGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255, FXColor.getOpacity() };
    }
	public TransparencySlider( double[] ARGB )//3rd & 4th Square DiagnosticsClass.java
	{
		if ( ARGB.length < 4 )
			this.ARGB = new double[] { ColorValueFitter(ARGB[0]),ColorValueFitter(ARGB[1]),ColorValueFitter(ARGB[2]),1};
		else
			this.ARGB = ARGB;
    	this.FXColor = FXColor.rgb( (int)(ColorValueFitter(this.ARGB[0])), (int)(ColorValueFitter(this.ARGB[1])), (int)(ColorValueFitter(this.ARGB[2])), OpacityValueFitter(this.ARGB[3]) );
    }
	public Object TransparencySliderFunction(double ColorInterval, double Loc, TransparencySlider ColorBefore, TransparencySlider ColorAfter)//5th Square DiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
			this.ARGB[z] = ColorValueFitter( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Loc/ColorInterval + ColorBefore.ARGB[z] ) );
		this.ARGB[3] = 1;
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, TransparencySlider ColorBefore, TransparencySlider ColorAfter, double Opacity)//6th Square DiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
			this.ARGB[z] = ColorValueFitter( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Loc/ColorInterval + ColorBefore.ARGB[z] ) );
		this.ARGB[3] = OpacityValueFitter( Opacity );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, TransparencySlider ColorBefore, TransparencySlider ColorAfter, double OpacityBefore, double OpacityAfter)//7th Square DiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
			this.ARGB[z] = ColorValueFitter( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Loc/ColorInterval + ColorBefore.ARGB[z] ) );
		this.ARGB[3] = OpacityValueFitter( (OpacityAfter - OpacityBefore) * Loc/ColorInterval + OpacityBefore );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, TransparencySlider ColorBefore, double BrightnessMultiplyer, TransparencySlider ColorAfter)//8th Square DiagnosticsClass.java
	{
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				this.ARGB[z] = ColorValueFitter( ( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Loc/ColorInterval + ColorBefore.ARGB[z] ) * BrightnessMultiplyer) );
		else
			for (int z = 0; z <= 2; z++)
			{
				this.ARGB[z] = Math.abs( ( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Loc/ColorInterval + ColorBefore.ARGB[z] ) ) );
				this.ARGB[z] = ColorValueFitter( (255 - ARGB[z]) / BrightnessMultiplyer + ARGB[z] );
			}
		this.ARGB[3] = 1;
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, TransparencySlider ColorBefore, double BrightnessMultiplyer, TransparencySlider ColorAfter, double Opacity)//9th Square DiagnosticsClass.java
	{
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				this.ARGB[z] = ColorValueFitter( ( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Loc/ColorInterval + ColorBefore.ARGB[z] ) * BrightnessMultiplyer) );
		else
			for (int z = 0; z <= 2; z++)
			{
				this.ARGB[z] = Math.abs( ( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Loc/ColorInterval + ColorBefore.ARGB[z] ) ) );
				this.ARGB[z] = ColorValueFitter( (255 - ARGB[z]) / BrightnessMultiplyer + ARGB[z] );
			}
		this.ARGB[3] = OpacityValueFitter( Opacity );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, TransparencySlider ColorBefore, double BrightnessMultiplyer, TransparencySlider ColorAfter, double OpacityBefore, double OpacityAfter)//10th Square DiagnosticsClass.java
	{
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				this.ARGB[z] = ColorValueFitter( ( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Loc/ColorInterval + ColorBefore.ARGB[z] ) * BrightnessMultiplyer) );
		else
			for (int z = 0; z <= 2; z++)
			{
				this.ARGB[z] = ColorValueFitter( ( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Loc/ColorInterval + ColorBefore.ARGB[z] ) ) );
				this.ARGB[z] = ( (255 - ARGB[z]) / BrightnessMultiplyer + ARGB[z] );
			}
		this.ARGB[3] = Math.abs( (OpacityAfter - OpacityBefore) * Loc/ColorInterval + OpacityBefore );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, int Gradations, TransparencySlider ColorBefore, TransparencySlider ColorAfter )//11th Square DiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
			this.ARGB[z] = ColorValueFitter( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.ARGB[z] ) );
		this.ARGB[3] = 1;
		this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, int Gradations, TransparencySlider ColorBefore, TransparencySlider ColorAfter, double Opacity)//12th Square DiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
			this.ARGB[z] = ColorValueFitter( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.ARGB[z] ) );
		this.ARGB[3] = OpacityValueFitter( Opacity );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, int Gradations, TransparencySlider ColorBefore, TransparencySlider ColorAfter, double OpacityBefore, double OpacityAfter)//13th Square DiagnosticsClass.java
	{
		for (int z = 0; z <= 2; z++)
			this.ARGB[z] = ColorValueFitter( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.ARGB[z] ) );
		this.ARGB[3] = OpacityValueFitter( ( (OpacityAfter - OpacityBefore) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + OpacityBefore ) );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, TransparencySlider ColorBefore, TransparencySlider ColorAfter)//14th Square DiagnosticsClass.java
	{
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				this.ARGB[z] = ColorValueFitter( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.ARGB[z] * BrightnessMultiplyer ) );
		else
			for (int z = 0; z <= 2; z++)
			{
				this.ARGB[z] = Math.abs( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.ARGB[z] ) );
				this.ARGB[z] = ColorValueFitter( (255 - ARGB[z]) / BrightnessMultiplyer + ARGB[z] );
			}
		this.ARGB[3] = 1;
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, TransparencySlider ColorBefore, TransparencySlider ColorAfter, double Opacity)//15th Square DiagnosticsClass.java
	{
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				this.ARGB[z] = Math.abs( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.ARGB[z] * BrightnessMultiplyer ) );
		else
			for (int z = 0; z <= 2; z++)
			{
				this.ARGB[z] = Math.abs( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.ARGB[z] ) );
				this.ARGB[z] = ColorValueFitter( (255 - ARGB[z]) / BrightnessMultiplyer + ARGB[z] );
			}
		this.ARGB[3] = OpacityValueFitter( Opacity );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Object TransparencySliderFunction(double ColorInterval, double Loc, double BrightnessMultiplyer, int Gradations, TransparencySlider ColorBefore, TransparencySlider ColorAfter, double OpacityBefore, double OpacityAfter)//16th Square DiagnosticsClass.java
	{
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				this.ARGB[z] = Math.abs( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.ARGB[z] * BrightnessMultiplyer ) );
		else
			for (int z = 0; z <= 2; z++)
			{
				this.ARGB[z] = Math.abs( ( (ColorAfter.ARGB[z] - ColorBefore.ARGB[z]) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + ColorBefore.ARGB[z] ) );
				this.ARGB[z] = ColorValueFitter( (255 - ARGB[z]) / BrightnessMultiplyer + ARGB[z] );
			}
		this.ARGB[3] = OpacityValueFitter( (OpacityAfter - OpacityBefore) * Math.floor( Loc/ColorInterval * ( Gradations + 2 ) ) / ( Gradations + 1 ) + OpacityBefore );
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
		return new TransparencySlider( ARGB );
	}
	public Color ToFXColor ()//17th Square DiagnosticsClass.java
	{
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
        return FXColor;
	}
	public Color ToFXColor ( double[] ARGB )//18th Square DiagnosticsClass.java
	{
		this.ARGB = ARGB;
        this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) );
        return FXColor;
	}
	//tempFXColor = tempFXColor.rgb((int)color.RGB[0] , Math.abs( (int)color.RGB[1] ), (int)color.RGB[2]).invert();
	public Boolean ColorTooSimilarFunction(int Color1, int Color2)//19th Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int color1A = (Color1 >> 24) & 0xff;
	    int color1R = (Color1 >> 16) & 0xff;
	    int color1G = (Color1 >> 8) & 0xff;
	    int color1B = (Color1) & 0xff;
	    int color2A = (Color2 >> 24) & 0xff;
	    int color2R = (Color2 >> 16) & 0xff;
	    int color2G = (Color2 >> 8) & 0xff;
	    int color2B = (Color2) & 0xff;
		/*
		int Color1A = Color1 / 16777216;
		int Color1R = ( Color1 - Color1A * 16777216 ) / 65536;
		int Color1G = ( Color1 - Color1A * 16777216 - Color1R * 65536 ) / 256;
		int Color1B = ( Color1 - Color1A * 16777216 - Color1R * 65536 - Color1G * 256);
		int Color2A = Color2 / 16777216;
		int Color2R = ( Color2 - Color2A * 16777216 ) / 65536;
		int Color2G = ( Color2 - Color2A * 16777216 - Color2R * 65536 ) / 256;
		int Color2B = ( Color2 - Color2A * 16777216 - Color2R * 65536 - Color2G * 256);// */
		int colorDifference = Math.abs(color1R - color2R) + Math.abs(color1G - color2G) + Math.abs(color1B - color2B);
		if ( colorDifference <= 164 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public Boolean ColorTooSimilarFunction(TransparencySlider Color1, TransparencySlider Color2)//20th Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int colorDifference = (int)( Math.abs(Color1.ARGB[0] - Color2.ARGB[0]) + Math.abs(Color1.ARGB[1] - Color2.ARGB[1]) + Math.abs(Color1.ARGB[2] - Color2.ARGB[2]) );
		if ( colorDifference <= 164 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public double ColorValueFitter ( double ColorToBeChecked )//21th Square DiagnosticsClass.java
	{
		this.ColorBeingChecked = Math.abs(ColorToBeChecked);
		while ( ColorBeingChecked > 255)
			this.ColorBeingChecked = ColorBeingChecked - 255;
		return ColorBeingChecked;
	}
	public double OpacityValueFitter ( double OpacityToBeChecked )//22nd Square DiagnosticsClass.java
	{
		this.OpacityBeingChecked = Math.abs(OpacityToBeChecked);
		while ( OpacityBeingChecked > 1)
			this.OpacityBeingChecked = OpacityBeingChecked - 1;
		return OpacityBeingChecked;
	}
	public void set(double[] ARGB) { this.ARGB = ARGB; if ( ARGB.length == 3 ) ARGB = new double[] { (double)(ColorValueFitter(ARGB[0])), (double)(ColorValueFitter(ARGB[1])), (double)(ColorValueFitter(ARGB[2])), (double)OpacityValueFitter(1) }; this.FXColor = FXColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), OpacityValueFitter(ARGB[3]) ); }//23rd Square DiagnosticsClass.java
	public void set(Color FXColor) { this.FXColor = FXColor; this.ARGB = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255, FXColor.getOpacity() }; }//24th Square DiagnosticsClass.java
    public Object get() { return ARGB; }
    //public Object get() { return FXColor; }
}
